Skip to content

Commit d5e0111

Browse files
authored
Refactor E2E suites to allow AHM integration (#384)
* Rename test account module Also, create new `testAccounts` object. * Update test accounts and scheduling in tests To run these tests in post-migration Asset Hubs, the scheduling technique used to coerce execution of extrinsics with origins other than signed must change to allow use of non-local block providers. Also, when running these tests in testnets, some of the default dev accounts have dirty states, so this commit begins the move to fresh accounts in E2E. Lastly, in some locations `scheduleInlineCallWithOrigin` was used without an `await` before it, which led to occasionally wrong behavior. * Use minimal validator bond if unset in network * Fix first slashing test * Add missing `applySlash` call to test * Fix staking tests to pass on both relay and AH * Refactor governance E2E tests to work post-AHM * Swap test accounts used in nom. pools test * Apply lint fixes * Fix nomination pool tests to be runnable in AH * Update scheduler tests to use new block provider refactor Some tests still need a second pass, but the idea is that they can now run on relay chains, parachains with or without AB, with local or non-local block providers. * Perform final fixes to scheduler E2E tests * Update proxy E2E tests * they now use the new `testAccounts` (snapshots (partially) updated, * pass new `TestConfig` parameter to E2E test trees * update proxy E2E tests to use new block provider (80% done) * Rename `TestConfig` param `relayOrPara` to `blockProvider` * Fix staking test snapshots * Update proxy test snapshots * Branch `incompleteSince` test fixes for Kusama * Add mistakenly removed era-change storage clean-up Without it, the unapplied slashing test times out, because building the era-change block takes some time to complete will all of the era's stakers.
1 parent 7879220 commit d5e0111

61 files changed

Lines changed: 3708 additions & 2542 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap

Lines changed: 172 additions & 157 deletions
Large diffs are not rendered by default.

packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap

Lines changed: 151 additions & 151 deletions
Large diffs are not rendered by default.

packages/kusama/src/__snapshots__/kusama.nominationPools.e2e.test.ts.snap

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ exports[`Kusama Nomination Pools > nomination pool double join test: an account
3838
"data": {
3939
"bonded": "(rounded 1700000000)",
4040
"joined": true,
41-
"member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam",
41+
"member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f",
4242
},
4343
"method": "Bonded",
4444
"section": "nominationPools",
@@ -129,16 +129,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > bond extra f
129129
[
130130
{
131131
"data": {
132-
"amount": "(rounded 1700000000)",
132+
"amount": "(rounded 1000000000000)",
133133
},
134134
"method": "Bonded",
135135
"section": "staking",
136136
},
137137
{
138138
"data": {
139-
"bonded": "(rounded 1700000000)",
139+
"bonded": "(rounded 1000000000000)",
140140
"joined": false,
141-
"member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam",
141+
"member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f",
142142
},
143143
"method": "Bonded",
144144
"section": "nominationPools",
@@ -155,7 +155,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > chill events
155155
},
156156
{
157157
"data": {
158-
"caller": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P",
158+
"caller": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf",
159159
},
160160
"method": "PoolNominatorChilled",
161161
"section": "nominationPools",
@@ -208,7 +208,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > commission a
208208
"data": {
209209
"current": [
210210
"0.10%",
211-
"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam",
211+
"Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f",
212212
],
213213
},
214214
"method": "PoolCommissionUpdated",
@@ -252,7 +252,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > create nomin
252252
},
253253
{
254254
"data": {
255-
"depositor": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F",
255+
"depositor": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns",
256256
},
257257
"method": "Created",
258258
"section": "nominationPools",
@@ -261,7 +261,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > create nomin
261261
"data": {
262262
"bonded": 1000000000000,
263263
"joined": true,
264-
"member": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F",
264+
"member": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns",
265265
},
266266
"method": "Bonded",
267267
"section": "nominationPools",
@@ -273,16 +273,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > join nominat
273273
[
274274
{
275275
"data": {
276-
"amount": "(rounded 1700000000)",
276+
"amount": 1000000000000,
277277
},
278278
"method": "Bonded",
279279
"section": "staking",
280280
},
281281
{
282282
"data": {
283-
"bonded": "(rounded 1700000000)",
283+
"bonded": 1000000000000,
284284
"joined": true,
285-
"member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam",
285+
"member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f",
286286
},
287287
"method": "Bonded",
288288
"section": "nominationPools",
@@ -294,7 +294,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > nomination p
294294
[
295295
{
296296
"data": {
297-
"caller": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P",
297+
"caller": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf",
298298
},
299299
"method": "PoolNominationMade",
300300
"section": "nominationPools",
@@ -369,16 +369,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > unbond (kick
369369
[
370370
{
371371
"data": {
372-
"amount": "(rounded 1700000000)",
372+
"amount": 1000000000000,
373373
},
374374
"method": "Unbonded",
375375
"section": "staking",
376376
},
377377
{
378378
"data": {
379-
"balance": "(rounded 1700000000)",
380-
"member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam",
381-
"points": "(rounded 1700000000)",
379+
"balance": 1000000000000,
380+
"member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f",
381+
"points": 1000000000000,
382382
},
383383
"method": "Unbonded",
384384
"section": "nominationPools",
@@ -390,16 +390,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > unbond event
390390
[
391391
{
392392
"data": {
393-
"amount": "(rounded 1700000000)",
393+
"amount": "(rounded 1000000000000)",
394394
},
395395
"method": "Unbonded",
396396
"section": "staking",
397397
},
398398
{
399399
"data": {
400-
"balance": "(rounded 1700000000)",
401-
"member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam",
402-
"points": "(rounded 1700000000)",
400+
"balance": "(rounded 1000000000000)",
401+
"member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f",
402+
"points": "(rounded 1000000000000)",
403403
},
404404
"method": "Unbonded",
405405
"section": "nominationPools",
@@ -411,9 +411,9 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > update roles
411411
[
412412
{
413413
"data": {
414-
"bouncer": "DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK",
415-
"nominator": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P",
416-
"root": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP",
414+
"bouncer": "H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h",
415+
"nominator": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf",
416+
"root": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk",
417417
},
418418
"method": "RolesUpdated",
419419
"section": "nominationPools",
@@ -432,7 +432,7 @@ exports[`Kusama Nomination Pools > nomination pool metadata test > create nomina
432432
},
433433
{
434434
"data": {
435-
"depositor": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F",
435+
"depositor": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns",
436436
},
437437
"method": "Created",
438438
"section": "nominationPools",
@@ -441,7 +441,7 @@ exports[`Kusama Nomination Pools > nomination pool metadata test > create nomina
441441
"data": {
442442
"bonded": 1000000000000,
443443
"joined": true,
444-
"member": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F",
444+
"member": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns",
445445
},
446446
"method": "Bonded",
447447
"section": "nominationPools",
@@ -453,7 +453,7 @@ exports[`Kusama Nomination Pools > nomination pool metadata test > set metadata
453453
[
454454
{
455455
"data": {
456-
"caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F",
456+
"caller": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns",
457457
},
458458
"method": "MetadataUpdated",
459459
"section": "nominationPools",
@@ -466,9 +466,9 @@ exports[`Kusama Nomination Pools > nomination pools update roles test > update p
466466
{
467467
"event": {
468468
"data": [
469-
"Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P",
470-
"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam",
471-
"DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK",
469+
"D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf",
470+
"Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f",
471+
"H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h",
472472
],
473473
"index": "0x2908",
474474
},
@@ -484,9 +484,9 @@ exports[`Kusama Nomination Pools > nomination pools update roles test > update r
484484
[
485485
{
486486
"data": {
487-
"bouncer": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP",
488-
"nominator": "DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK",
489-
"root": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F",
487+
"bouncer": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk",
488+
"nominator": "H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h",
489+
"root": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns",
490490
},
491491
"method": "RolesUpdated",
492492
"section": "nominationPools",
@@ -523,8 +523,8 @@ exports[`Kusama Nomination Pools > nomination pools update roles test > update r
523523
[
524524
{
525525
"data": {
526-
"bouncer": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP",
527-
"nominator": "DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK",
526+
"bouncer": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk",
527+
"nominator": "H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h",
528528
"root": null,
529529
},
530530
"method": "RolesUpdated",

0 commit comments

Comments
 (0)