difftreelog
tests(collator-selection): further fixes
in: master
2 files changed
pallets/collator-selection/src/tests.rsdiffbeforeafterboth108105109 // cannot remove an invulnerable if there would be 0 invulnerables.106 // cannot remove an invulnerable if there would be 0 invulnerables.110 assert_noop!(107 assert_noop!(111 CollatorSelection::add_invulnerable(108 CollatorSelection::remove_invulnerable(RuntimeOrigin::signed(RootAccount::get()), 1),112 RuntimeOrigin::signed(RootAccount::get()), 113 1114 ),115 Error::<Test>::NotInvulnerable109 Error::<Test>::TooFewInvulnerables116 );110 );117 });111 });118}112}tests/src/collatorSelection.seqtest.tsdiffbeforeafterboth--- a/tests/src/collatorSelection.seqtest.ts
+++ b/tests/src/collatorSelection.seqtest.ts
@@ -64,6 +64,10 @@
before(async function() {
await usingPlaygrounds(async (helper, privateKey) => {
+ // todo:collator see again if blocks start to be finalized in dev mode
+ // Skip the collator block production in dev mode, since the blocks are sealed automatically.
+ if (await helper.arrange.isDevNode()) this.skip();
+
alice = await privateKey('//Alice');
bob = await privateKey('//Bob');
charlie = await privateKey('//Charlie');
@@ -141,7 +145,7 @@
after(async () => {
await usingPlaygrounds(async (helper) => {
- if (helper.fetchMissingPalletNames([Pallets.CollatorSelection]).length != 0) return;
+ if (await helper.arrange.isDevNode()) return;
let nonce = await helper.chain.getNonce(superuser.address);
await Promise.all([
@@ -161,7 +165,7 @@
// todo:collator make sure that there is enough session time for a set of tests
// 28 non-functioning collators, teehee.
- describe.skip('Addition and removal of invulnerables', () => {
+ describe('Addition and removal of invulnerables', () => {
before(async function() {
await resetInvulnerables();
});
@@ -261,7 +265,14 @@
expect(await helper.collatorSelection.getInvulnerables()).to.have.all.members(invulnerables);
});
});
+
+ after(async () => {
+ // eslint-disable-next-line require-await
+ await usingPlaygrounds(async (helper) => {
+ if (helper.fetchMissingPalletNames([Pallets.CollatorSelection]).length != 0) return;
- // todo:collator after
+ // todo:collator after
+ });
+ });
});
});
\ No newline at end of file