Browse Source

build script for network tests added, readme updated

Gleb Urvanov 4 years ago
parent
commit
5ac4c2abd4
2 changed files with 25 additions and 2 deletions
  1. 11 2
      README.md
  2. 14 0
      scripts/run-test-chain.sh

+ 11 - 2
README.md

@@ -79,14 +79,23 @@ This will build and run a fresh new local development chain purging existing one
 cargo test
 ```
 
-### API integration tests
+### Network tests
 
 ```bash
-./scripts/run-dev-chain.sh
+./scripts/run-test-chain.sh
 yarn test
 ```
 
 To run the integration tests with a different chain, you can omit step running the local development chain and set the node URL using `NODE_URL` environment variable.
+Proposal grace periods should be set to 0, otherwise proposal network tests will fail.
+
+### Rome-Constantinople migration network test
+
+Ensure Rome node is up and running, and node URL is set using `NODE_URL` environment variable (default value is `localhost:9944`).
+
+```bash
+yarn test-migration
+```
 
 ## Joystream Runtime
 

+ 14 - 0
scripts/run-test-chain.sh

@@ -0,0 +1,14 @@
+#!/bin/bash
+cargo build --release -p joystream-node
+cargo run --release -p joystream-node build-spec --chain dev > chainspec.json
+sed -i 's/"setValidatorCountProposalGracePeriod":.*/"setValidatorCountProposalGracePeriod": 0,/' chainspec.json
+sed -i 's/"runtimeUpgradeProposalGracePeriod":.*/"runtimeUpgradeProposalGracePeriod": 0,/' ./chainspec.json
+sed -i 's/"setElectionParametersProposalGracePeriod":.*/"setElectionParametersProposalGracePeriod": 0,/' ./chainspec.json
+sed -i 's/"textProposalGracePeriod":.*/"textProposalGracePeriod": 0,/' chainspec.json
+sed -i 's/"setContentWorkingGroupMintCapacityProposalGracePeriod":.*/"setContentWorkingGroupMintCapacityProposalGracePeriod": 0,/' chainspec.json
+sed -i 's/"setLeadProposalGracePeriod":.*/"setLeadProposalGracePeriod": 0,/' chainspec.json
+sed -i 's/"spendingProposalGracePeriod":.*/"spendingProposalGracePeriod": 0,/' chainspec.json
+sed -i 's/"evictStorageProviderProposalGracePeriod":.*/"evictStorageProviderProposalGracePeriod": 0,/' chainspec.json
+sed -i 's/"setStorageRoleParametersProposalGracePeriod":.*/"setStorageRoleParametersProposalGracePeriod": 0,/' chainspec.json
+yes | cargo run --release -p joystream-node -- purge-chain --dev
+cargo run --release -p joystream-node -- --dev