Skip to content

Commit

Permalink
test: ✅ Fix zombienet tests
Browse files Browse the repository at this point in the history
Post 1.7.2 upgrade, the plainspec format has changed so we need to update our script
  • Loading branch information
timbrinded committed Apr 16, 2024
1 parent f99b3ef commit 3c74d7c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -615,17 +615,6 @@ jobs:
docker create --name moonbeam_container $DOCKER_TAG bash
docker cp moonbeam_container:moonbeam/moonbeam test/tmp/moonbeam_rt
docker rm -f moonbeam_container
- name: "TEMPORARY: Download forked polkadot-bins"
run: |
# When we remove this step, re-add "runScripts": ["download-polkadot.sh"]," to moonwall config
cd test/tmp
wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot
wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot-execute-worker
wget https://opslayer-dev-artifacts.s3.us-east-2.amazonaws.com/bins/moonbeam/polkadot/1.3.0/polkadot-prepare-worker
chmod +x polkadot
chmod +x polkadot-execute-worker
chmod +x polkadot-prepare-worker
- name: Prepare Chainspecs
run: |
cd test
Expand Down
18 changes: 14 additions & 4 deletions test/scripts/modify-plain-specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,20 @@ yargs(hideBin(process.argv))
process.stdout.write("Done ✅\n");

plainSpec.bootNodes = [];
plainSpec.genesis.runtime.authorMapping.mappings = [
["5HEL3iLyDyaqmfibHXAXVzyQq4fBqLCHGMEYxZXgRAuhEKXX", ALITH_ADDRESS],
];
plainSpec.genesis.runtime.openTechCommitteeCollective.members = [ALITH_ADDRESS];
if ("runtimeGenesis" in plainSpec.genesis) {
plainSpec.genesis.runtimeGenesis.config.authorMapping.mappings = [
["5HEL3iLyDyaqmfibHXAXVzyQq4fBqLCHGMEYxZXgRAuhEKXX", ALITH_ADDRESS],
];

plainSpec.genesis.runtimeGenesis.config.openTechCommitteeCollective.members = [
ALITH_ADDRESS,
];
} else {
plainSpec.genesis.runtime.authorMapping.mappings = [
["5HEL3iLyDyaqmfibHXAXVzyQq4fBqLCHGMEYxZXgRAuhEKXX", ALITH_ADDRESS],
];
plainSpec.genesis.runtime.openTechCommitteeCollective.members = [ALITH_ADDRESS];
}

process.stdout.write(`Writing to: ${argv.outputPath} ...`);
await fs.writeFile(
Expand Down

0 comments on commit 3c74d7c

Please sign in to comment.