Skip to content

Commit 3123d23

Browse files
karolk91rockbmb
andauthored
Initial E2E system tests (set_code, authorize_upgrade) (#411)
* Initial E2E system tests (set_code and set_code_without_checks) * Add scenarios using authorize+apply * Upgrade scenarios for Polkadot/Kusama system chains * Code-review fixes * Update packages/shared/src/system.ts Co-authored-by: Alexandre R. Baldé <[email protected]> * Code review improvements * Review fixes and improvements * Add more post-AHM scenarios --------- Co-authored-by: Alexandre R. Baldé <[email protected]>
1 parent c058ff3 commit 3123d23

16 files changed

+1161
-28
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { assetHubKusama } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsForParaWithScheduler } from '@e2e-test/shared'
3+
4+
// TODO: Uncomment after Kusama 2.0+ release due to polkadot-fellows/runtimes#957
5+
// const testConfig: ParaTestConfig = {
6+
// testSuiteName: 'Kusama AssetHub System',
7+
// addressEncoding: 2,
8+
// blockProvider: 'Local',
9+
// asyncBacking: 'Enabled',
10+
// }
11+
// registerTestTree(systemE2ETestsViaRemoteScheduler(kusama, assetHubKusama, testConfig))
12+
13+
const testConfigForLocalScheduler: ParaTestConfig = {
14+
testSuiteName: 'Kusama AssetHub System',
15+
addressEncoding: 2,
16+
blockProvider: 'NonLocal',
17+
asyncBacking: 'Enabled',
18+
}
19+
20+
registerTestTree(systemE2ETestsForParaWithScheduler(assetHubKusama, testConfigForLocalScheduler))
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { assetHubKusama, bridgeHubKusama } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
// TODO: Uncomment after Kusama 2.0+ release due to polkadot-fellows/runtimes#957
5+
// const testConfig: ParaTestConfig = {
6+
// testSuiteName: 'Kusama BridgeHub System',
7+
// addressEncoding: 2,
8+
// blockProvider: 'Local',
9+
// asyncBacking: 'Enabled',
10+
// }
11+
12+
// registerTestTree(systemE2ETestsViaRemoteScheduler(kusama, bridgeHubKusama, testConfig))
13+
14+
const testConfigForAssetHub: ParaTestConfig = {
15+
testSuiteName: 'Kusama BridgeHub System',
16+
addressEncoding: 2,
17+
blockProvider: 'NonLocal',
18+
asyncBacking: 'Enabled',
19+
}
20+
21+
registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubKusama, bridgeHubKusama, testConfigForAssetHub))
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { assetHubKusama, coretimeKusama } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
// TODO: Uncomment after Kusama 2.0+ release due to polkadot-fellows/runtimes#957
5+
// const testConfig: ParaTestConfig = {
6+
// testSuiteName: 'Kusama Coretime System',
7+
// addressEncoding: 0,
8+
// blockProvider: 'Local',
9+
// asyncBacking: 'Enabled',
10+
// }
11+
12+
// registerTestTree(systemE2ETestsViaRemoteScheduler(kusama, coretimeKusama, testConfig))
13+
14+
const testConfigForAssetHub: ParaTestConfig = {
15+
testSuiteName: 'Kusama Coretime System',
16+
addressEncoding: 2,
17+
blockProvider: 'NonLocal',
18+
asyncBacking: 'Enabled',
19+
}
20+
21+
registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubKusama, coretimeKusama, testConfigForAssetHub))
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { assetHubKusama, encointerKusama } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
// TODO: Uncomment after Kusama 2.0+ release due to polkadot-fellows/runtimes#957
5+
// const testConfig: ParaTestConfig = {
6+
// testSuiteName: 'Kusama Encointer System',
7+
// addressEncoding: 0,
8+
// blockProvider: 'Local',
9+
// asyncBacking: 'Enabled',
10+
// }
11+
12+
// registerTestTree(systemE2ETestsViaRemoteScheduler(kusama, encointerKusama, testConfig))
13+
14+
const testConfigForAssetHub: ParaTestConfig = {
15+
testSuiteName: 'Kusama Encointer System',
16+
addressEncoding: 2,
17+
blockProvider: 'NonLocal',
18+
asyncBacking: 'Enabled',
19+
}
20+
21+
registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubKusama, encointerKusama, testConfigForAssetHub))
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { assetHubKusama, kusama } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
// TODO: Uncomment after Kusama 2.0+ release due to polkadot-fellows/runtimes#957
5+
// const testConfig: RelayTestConfig = {
6+
// testSuiteName: 'Kusama System',
7+
// addressEncoding: 2,
8+
// blockProvider: 'Local',
9+
// }
10+
11+
// registerTestTree(systemE2ETests(kusama, testConfig))
12+
13+
const testConfigForAssetHub: ParaTestConfig = {
14+
testSuiteName: 'Kusama System',
15+
addressEncoding: 2,
16+
blockProvider: 'NonLocal',
17+
asyncBacking: 'Enabled',
18+
}
19+
20+
registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubKusama, kusama, testConfigForAssetHub))
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { assetHubKusama, peopleKusama } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
// TODO: Uncomment after Kusama 2.0+ release due to polkadot-fellows/runtimes#957
5+
// const testConfig: ParaTestConfig = {
6+
// testSuiteName: 'Kusama People System',
7+
// addressEncoding: 0,
8+
// blockProvider: 'Local',
9+
// asyncBacking: 'Enabled',
10+
// }
11+
12+
// registerTestTree(systemE2ETestsViaRemoteScheduler(kusama, peopleKusama, testConfig))
13+
14+
const testConfigForAssetHub: ParaTestConfig = {
15+
testSuiteName: 'Kusama People System',
16+
addressEncoding: 2,
17+
blockProvider: 'NonLocal',
18+
asyncBacking: 'Enabled',
19+
}
20+
21+
registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubKusama, peopleKusama, testConfigForAssetHub))
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { assetHubPolkadot, polkadot } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
const testConfig: ParaTestConfig = {
5+
testSuiteName: 'Polkadot AssetHub System',
6+
addressEncoding: 0,
7+
blockProvider: 'Local',
8+
asyncBacking: 'Enabled',
9+
}
10+
11+
registerTestTree(systemE2ETestsViaRemoteScheduler(polkadot, assetHubPolkadot, testConfig))
12+
13+
// TODO: Uncomment Post-AHM on Polkadot
14+
15+
// const testConfigForLocalScheduler: ParaTestConfig = {
16+
// testSuiteName: 'Polkadot AssetHub System',
17+
// addressEncoding: 0,
18+
// blockProvider: 'NonLocal',
19+
// asyncBacking: 'Enabled',
20+
// }
21+
22+
// registerTestTree(systemE2ETestsForParaWithScheduler(assetHubPolkadot, testConfigForLocalScheduler))
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { bridgeHubPolkadot, polkadot } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
const testConfig: ParaTestConfig = {
5+
testSuiteName: 'Polkadot BridgeHub System',
6+
addressEncoding: 0,
7+
blockProvider: 'Local',
8+
asyncBacking: 'Enabled',
9+
}
10+
11+
registerTestTree(systemE2ETestsViaRemoteScheduler(polkadot, bridgeHubPolkadot, testConfig))
12+
13+
// TODO: Uncomment Post-AHM on Polkadot
14+
15+
// const testConfigForAssetHub: ParaTestConfig = {
16+
// testSuiteName: 'Polkadot BridgeHub System',
17+
// addressEncoding: 0,
18+
// blockProvider: 'NonLocal',
19+
// asyncBacking: 'Enabled',
20+
// }
21+
22+
// registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubPolkadot, bridgeHubPolkadot, testConfigForAssetHub))
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { collectivesPolkadot, polkadot } from '@e2e-test/networks/chains'
2+
import {
3+
type ParaTestConfig,
4+
registerTestTree,
5+
systemE2ETestsForParaWithScheduler,
6+
systemE2ETestsViaRemoteScheduler,
7+
} from '@e2e-test/shared'
8+
9+
const testConfig: ParaTestConfig = {
10+
testSuiteName: 'Polkadot Collectives System',
11+
addressEncoding: 0,
12+
blockProvider: 'Local',
13+
asyncBacking: 'Enabled',
14+
}
15+
16+
registerTestTree(systemE2ETestsViaRemoteScheduler(polkadot, collectivesPolkadot, testConfig))
17+
registerTestTree(systemE2ETestsForParaWithScheduler(collectivesPolkadot, testConfig))
18+
19+
// TODO: Uncomment Post-AHM on Polkadot
20+
21+
// const testConfigForAssetHub: ParaTestConfig = {
22+
// testSuiteName: 'Polkadot Collectives System',
23+
// addressEncoding: 0,
24+
// blockProvider: 'NonLocal',
25+
// asyncBacking: 'Enabled',
26+
// }
27+
28+
// registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubPolkadot, collectivesPolkadot, testConfigForAssetHub))
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { coretimePolkadot, polkadot } from '@e2e-test/networks/chains'
2+
import { type ParaTestConfig, registerTestTree, systemE2ETestsViaRemoteScheduler } from '@e2e-test/shared'
3+
4+
const testConfig: ParaTestConfig = {
5+
testSuiteName: 'Polkadot Coretime System',
6+
addressEncoding: 0,
7+
blockProvider: 'Local',
8+
asyncBacking: 'Enabled',
9+
}
10+
11+
registerTestTree(systemE2ETestsViaRemoteScheduler(polkadot, coretimePolkadot, testConfig))
12+
13+
// TODO: Uncomment Post-AHM on Polkadot
14+
15+
// const testConfigForAssetHub: ParaTestConfig = {
16+
// testSuiteName: 'Polkadot Coretime System',
17+
// addressEncoding: 0,
18+
// blockProvider: 'NonLocal',
19+
// asyncBacking: 'Enabled',
20+
// }
21+
22+
// registerTestTree(systemE2ETestsViaRemoteScheduler(assetHubPolkadot, coretimePolkadot, testConfigForAssetHub))

0 commit comments

Comments
 (0)