-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add initial config and split common tests * add inflation rewards tests for dancelight * adapt more tests specific to dancelight * remove log
- Loading branch information
Showing
19 changed files
with
380 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
test/suites/smoke-test-dancelight/test-authority-consistency-assignation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { beforeAll, describeSuite, expect } from "@moonwall/cli"; | ||
|
||
import { ApiPromise } from "@polkadot/api"; | ||
|
||
describeSuite({ | ||
id: "S16", | ||
title: "Sample suite that only runs on Dancelight chains", | ||
foundationMethods: "read_only", | ||
testCases: ({ it, context }) => { | ||
let api: ApiPromise; | ||
|
||
beforeAll(() => { | ||
api = context.polkadotJs(); | ||
}); | ||
|
||
it({ | ||
id: "C01", | ||
title: "Collator assignation and authority assignation should match with observed mapping in containers", | ||
test: async function () { | ||
const assignmentCollatorAccount = ( | ||
await api.query.tanssiCollatorAssignment.collatorContainerChain() | ||
).toJSON(); | ||
const sessionIndex = (await api.query.session.currentIndex()).toNumber(); | ||
const assignmentCollatorKey = ( | ||
await api.query.tanssiAuthorityAssignment.collatorContainerChain(sessionIndex) | ||
).toJSON(); | ||
const authorityKeyMapping = ( | ||
await api.query.tanssiAuthorityMapping.authorityIdMapping(sessionIndex) | ||
).toJSON(); | ||
for (const container of Object.keys(assignmentCollatorKey["containerChains"])) { | ||
for (const key of assignmentCollatorKey["containerChains"][container]) { | ||
const assignedAccount = authorityKeyMapping[key.toString()]; | ||
expect( | ||
assignmentCollatorAccount["containerChains"][container].includes(assignedAccount.toString()) | ||
).to.be.true; | ||
} | ||
} | ||
}, | ||
}); | ||
}, | ||
}); |
Oops, something went wrong.