Skip to content

Commit 726abb4

Browse files
committed
Hoist upgrade clients to suite scope
The four governanceChain*Upgrade*Suite factories were childless 'describe' nodes; each child test self-created its clients via createNetworks and tore them down in a try/finally. The url === url runtime branch at every call site existed only to handle the suite passing the same chain twice (self-upgrade). Move client creation to suite-level beforeAll, snapshot via captureSnapshot in beforeEach (with setHead on every client), tear down in afterAll. The four *Tests functions now take Client args directly. The url === url runtime branch becomes Client === Client identity comparison. Drops ~150 lines of teardown boilerplate and one self-vs-cross branch per *Tests entry. Also adds an explicit newBlock on the to-be-upgraded chain after the relay's referendum dispatches, when governance and to-be-upgraded chains differ. The cross-chain authorize_upgrade arrives via DMP and needs one parachain block to be processed before apply_authorized_upgrade can read System.AuthorizedUpgrade. The pre-existing per-test fresh-network pattern accidentally provided this ordering; with the hoisted suite, it must be explicit. Verified: all 14 non-skipped upgrade tests (35 tests total) pass.
1 parent 568d525 commit 726abb4

1 file changed

Lines changed: 189 additions & 203 deletions

File tree

0 commit comments

Comments
 (0)