Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add governance e2e tests #115

Merged
merged 33 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3204dcf
WIP
rockbmb Nov 4, 2024
38ce3bc
Draft governance test with PAPI (WIP)
rockbmb Nov 17, 2024
f376472
Check standard voting in referendum E2E test
rockbmb Nov 18, 2024
439f4e4
Vote and split vote in referendum lifecycle test
rockbmb Nov 20, 2024
36b5e49
Test `splitAbstain` in referendum lifecycle
rockbmb Nov 20, 2024
0690dd9
Check each voters's locked funds
rockbmb Nov 21, 2024
60d1168
Add decision deposit to referendum lifecycle test
rockbmb Nov 22, 2024
1988ab2
Test referendum status invariants between actions
rockbmb Nov 22, 2024
8f4dc77
Add more comments
rockbmb Nov 22, 2024
7272def
Merge branch 'master' into governance-e2e-tests
rockbmb Nov 22, 2024
6354864
Remove mistakenly leftover PAPI metadata
rockbmb Nov 22, 2024
39e217a
Replicate referendum lifecycle test on Kusama
rockbmb Nov 22, 2024
e14d822
Refactor common test suite runners per PR comment
rockbmb Nov 28, 2024
d49a1a6
Include decision deposit process in governance test
rockbmb Nov 29, 2024
e8d5aaf
Remove time-sensitive data from voting tx snapshots
rockbmb Nov 29, 2024
ae1bfe1
Test preimage noting/uerying/unnoting
rockbmb Dec 4, 2024
76fb098
Add referendum cancellation to lifecycle test
rockbmb Dec 9, 2024
ee4fd07
Increase coverage of voting status across more states
rockbmb Dec 10, 2024
ad3fec1
Update Kusama snapshots
rockbmb Dec 10, 2024
a39d8a1
Merge branch 'master' into governance-e2e-tests
rockbmb Dec 10, 2024
6e6d723
Refactor tests to avoid boilerplate queries
rockbmb Dec 10, 2024
ca2b6e4
Add test to referendum killing (via root + XCM)
rockbmb Dec 11, 2024
9766ae1
Remove leftover `pause()`
rockbmb Dec 11, 2024
1e853bc
Remove leftover empty snapshots
rockbmb Dec 11, 2024
3fb5e48
Apply lint
rockbmb Dec 11, 2024
624a84f
Add missing newline to end of snapshot
rockbmb Dec 11, 2024
09fed62
Address review comments
rockbmb Dec 12, 2024
bd9f25f
Reset Alice's funds in Polkadot/Kusama
rockbmb Dec 12, 2024
01d8ed5
Clear events from voting while awaiting runtime update
rockbmb Dec 16, 2024
d55b6f8
Merge branch 'master' into governance-e2e-tests
rockbmb Dec 16, 2024
ee8b59c
Simplify referendum comparison
rockbmb Dec 16, 2024
5c2f81e
Remove `.filter.forEach` in referendum comparison
rockbmb Dec 17, 2024
ab7735c
Remove unused file
rockbmb Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
454 changes: 454 additions & 0 deletions packages/kusama/src/__snapshots__/kusama.governance.e2e.test.ts.snap

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions packages/kusama/src/kusama.governance.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { kusama } from '@e2e-test/networks/chains'

import { governanceE2ETests } from '@e2e-test/shared'

governanceE2ETests(kusama, { testSuiteName: "Kusama Governance", addressEncoding: 2})
4 changes: 2 additions & 2 deletions packages/kusama/src/people.kusama.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { kusama, peopleKusama } from '@e2e-test/networks/chains'

import { PeopleChain, peopleChainE2ETests } from '@e2e-test/shared'
import { peopleChainE2ETests } from '@e2e-test/shared'

peopleChainE2ETests(PeopleChain.Kusama, kusama, peopleKusama)
peopleChainE2ETests(kusama, peopleKusama, { testSuiteName: "Kusama People", addressEncoding: 2})
8 changes: 5 additions & 3 deletions packages/networks/src/chains/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ const custom = {

const getInitStorages = () => ({
System: {
Account: [[[defaultAccounts.alice.address], { providers: 1, data: { free: 10 * 1e12 } }]],
Account: [
[[defaultAccounts.alice.address], { providers: 1, data: { free: 1000 * 1e10 } }],
],
},
ParasDisputes: {
// these can makes block building super slow
Expand All @@ -26,15 +28,15 @@ const getInitStorages = () => ({

export const polkadot = defineChain({
name: 'polkadot',
endpoint: 'wss://polkadot-rpc.dwellir.com',
endpoint: 'wss://rpc-polkadot.luckyfriday.io',
custom: custom.polkadot,
initStorages: getInitStorages(),
isRelayChain: true,
})

export const kusama = defineChain({
name: 'kusama',
endpoint: 'wss:///kusama-rpc.dwellir.com',
endpoint: 'wss://rpc-kusama.luckyfriday.io',
custom: custom.kusama,
initStorages: getInitStorages(),
isRelayChain: true,
Expand Down
Loading
Loading