Skip to content

Commit 5e473d0

Browse files
committed
make sure we really update every param we wanted to
1 parent 4f9f278 commit 5e473d0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

src/testcases/run_in_band/chain_manager.test.ts

+44
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ describe('Neutron / Chain Manager', () => {
292292
});
293293

294294
test('execute timelocked: success', async () => {
295+
const cronParamsBefore = await cronQuerier.params();
295296
await waitSeconds(10);
296297

297298
await subdaoMember1.executeTimelockedProposal(proposalId);
@@ -302,6 +303,12 @@ describe('Neutron / Chain Manager', () => {
302303

303304
const cronParams = await cronQuerier.params();
304305
expect(cronParams.params.limit).toEqual(42n);
306+
// check that every params field before proposal execution differs from the field after proposal execution
307+
expect(
308+
Object.keys(cronParamsBefore).every(
309+
(key) => cronParamsBefore[key] !== cronParams[key],
310+
),
311+
).toBeTrue();
305312
});
306313
});
307314

@@ -336,6 +343,7 @@ describe('Neutron / Chain Manager', () => {
336343
});
337344

338345
test('execute timelocked: success', async () => {
346+
const tokenfactoryParamsBefore = await tokenfactoryQuerier.params();
339347
await waitSeconds(10);
340348

341349
await subdaoMember1.executeTimelockedProposal(proposalId);
@@ -358,6 +366,12 @@ describe('Neutron / Chain Manager', () => {
358366
denomCreator: 'neutron1m9l358xunhhwds0568za49mzhvuxx9ux8xafx2',
359367
},
360368
]);
369+
// check that every params field before proposal execution differs from the field after proposal execution
370+
expect(
371+
Object.keys(tokenfactoryParamsBefore).every(
372+
(key) => tokenfactoryParamsBefore[key] !== tokenfactoryParams[key],
373+
),
374+
).toBeTrue();
361375
});
362376
});
363377

@@ -390,6 +404,7 @@ describe('Neutron / Chain Manager', () => {
390404
});
391405

392406
test('execute timelocked: success', async () => {
407+
const dexParamsBefore = await dexQuerier.params();
393408
await waitSeconds(10);
394409

395410
await subdaoMember1.executeTimelockedProposal(proposalId);
@@ -403,6 +418,12 @@ describe('Neutron / Chain Manager', () => {
403418
expect(dexParams.params.paused).toEqual(true);
404419
expect(dexParams.params.maxJitsPerBlock).toEqual(11n);
405420
expect(dexParams.params.goodTilPurgeAllowance).toEqual(50000n);
421+
// check that every params field before proposal execution differs from the field after proposal execution
422+
expect(
423+
Object.keys(dexParamsBefore).every(
424+
(key) => dexParamsBefore[key] !== dexParams[key],
425+
),
426+
).toBeTrue();
406427
});
407428
});
408429

@@ -429,6 +450,7 @@ describe('Neutron / Chain Manager', () => {
429450
});
430451

431452
test('execute timelocked: success', async () => {
453+
const dynamicfeesParamsBefore = await dynamicfeesQuerier.params();
432454
await waitSeconds(10);
433455

434456
await subdaoMember1.executeTimelockedProposal(proposalId);
@@ -441,6 +463,12 @@ describe('Neutron / Chain Manager', () => {
441463
expect(dynamicfeesParams.params.ntrnPrices).toEqual([
442464
{ denom: 'newdenom', amount: '0.5' },
443465
]);
466+
// check that every params field before proposal execution differs from the field after proposal execution
467+
expect(
468+
Object.keys(dynamicfeesParamsBefore).every(
469+
(key) => dynamicfeesParamsBefore[key] !== dynamicfeesParams[key],
470+
),
471+
).toBeTrue();
444472
});
445473
});
446474

@@ -469,6 +497,7 @@ describe('Neutron / Chain Manager', () => {
469497
});
470498

471499
test('execute timelocked: success', async () => {
500+
const globalfeeParamsBefore = await globalfeeQuerier.params();
472501
await waitSeconds(10);
473502

474503
await subdaoMember1.executeTimelockedProposal(proposalId);
@@ -487,6 +516,12 @@ describe('Neutron / Chain Manager', () => {
487516
expect(globalfeeParams.params.maxTotalBypassMinFeeMsgGasUsage).toEqual(
488517
12345n,
489518
);
519+
// check that every params field before proposal execution differs from the field after proposal execution
520+
expect(
521+
Object.keys(globalfeeParamsBefore).every(
522+
(key) => globalfeeParamsBefore[key] !== globalfeeParams[key],
523+
),
524+
).toBeTrue();
490525
});
491526
});
492527

@@ -525,6 +560,7 @@ describe('Neutron / Chain Manager', () => {
525560
});
526561

527562
test('execute timelocked: success', async () => {
563+
const ccvParamsBefore = await ccvQuerier.queryParams();
528564
await waitSeconds(10);
529565

530566
await subdaoMember1.executeTimelockedProposal(proposalId);
@@ -568,6 +604,14 @@ describe('Neutron / Chain Manager', () => {
568604
nanos: 0,
569605
seconds: 43n,
570606
});
607+
// field 'enabled' is readonly, and should not be changed, always equals true
608+
delete ccvParamsBefore['enabled'];
609+
// check that every params field before proposal execution differs from the field after proposal execution
610+
expect(
611+
Object.keys(ccvParamsBefore).every(
612+
(key) => ccvParamsBefore[key] !== ccvParams[key],
613+
),
614+
).toBeTrue();
571615
});
572616
});
573617

0 commit comments

Comments
 (0)