mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
[Zombienet] add upgrade test (#5970)
* add upgrade test * fix node names * changes from feedback * rename bash script * fix upgrade node test * upgrade node test, use env * bump zombienet version and fix upgrade test * bump zombienet version * bump zombienet * fix raw link for binary * adjust within time
This commit is contained in:
+36
-1
@@ -32,7 +32,7 @@ variables:
|
||||
CI_IMAGE: "paritytech/ci-linux:production"
|
||||
DOCKER_OS: "debian:stretch"
|
||||
ARCH: "x86_64"
|
||||
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.56"
|
||||
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.67"
|
||||
PIPELINE_SCRIPTS_TAG: "v0.4"
|
||||
|
||||
default:
|
||||
@@ -231,6 +231,9 @@ build-linux-stable:
|
||||
- echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})"
|
||||
- echo -n ${VERSION} > ./artifacts/VERSION
|
||||
- echo -n ${EXTRATAG} > ./artifacts/EXTRATAG
|
||||
- echo -n ${CI_JOB_ID} > ./artifacts/BUILD_LINUX_JOB_ID
|
||||
- RELEASE_VERSION=$(./artifacts/polkadot -V | awk '{print $2}'| awk -F "-" '{print $1}')
|
||||
- echo -n "v${RELEASE_VERSION}" > ./artifacts/BUILD_RELEASE_VERSION
|
||||
- cp -r scripts/* ./artifacts
|
||||
|
||||
test-linux-stable:
|
||||
@@ -868,6 +871,38 @@ zombienet-tests-misc-paritydb:
|
||||
tags:
|
||||
- zombienet-polkadot-integration-test
|
||||
|
||||
zombienet-tests-misc-upgrade-node:
|
||||
stage: stage3
|
||||
image: "${ZOMBIENET_IMAGE}"
|
||||
<<: *kubernetes-env
|
||||
<<: *zombienet-refs
|
||||
needs:
|
||||
- job: publish-polkadot-debug-image
|
||||
- job: publish-test-collators-image
|
||||
- job: build-linux-stable
|
||||
artifacts: true
|
||||
variables:
|
||||
GH_DIR: "https://github.com/paritytech/polkadot/tree/${CI_COMMIT_SHORT_SHA}/zombienet_tests/misc"
|
||||
before_script:
|
||||
- echo "Zombie-net Tests Config"
|
||||
- echo "${ZOMBIENET_IMAGE_NAME}"
|
||||
- echo "${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}"
|
||||
- echo "${GH_DIR}"
|
||||
- export DEBUG=zombie,zombie::network-node
|
||||
- BUILD_RELEASE_VERSION="$(cat ./artifacts/BUILD_RELEASE_VERSION)"
|
||||
- export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/parity/polkadot:${BUILD_RELEASE_VERSION}"
|
||||
- export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG}
|
||||
- BUILD_LINUX_JOB_ID="$(cat ./artifacts/BUILD_LINUX_JOB_ID)"
|
||||
- export POLKADOT_PR_BIN_URL="https://gitlab.parity.io/parity/mirrors/polkadot/-/jobs/${BUILD_LINUX_JOB_ID}/artifacts/raw/artifacts/polkadot"
|
||||
script:
|
||||
- /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh
|
||||
--github-remote-dir="${GH_DIR}"
|
||||
--test="0002-upgrade-node.feature"
|
||||
allow_failure: false
|
||||
retry: 2
|
||||
tags:
|
||||
- zombienet-polkadot-integration-test
|
||||
|
||||
zombienet-tests-malus-dispute-valid:
|
||||
stage: stage3
|
||||
image: "${ZOMBIENET_IMAGE}"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
echo $@
|
||||
|
||||
CFG_DIR=/cfg
|
||||
|
||||
# add CFG_DIR as first `looking dir` to allow to overrides commands.
|
||||
mkdir -p $CFG_DIR
|
||||
export PATH=$CFG_DIR:$PATH
|
||||
|
||||
cd $CFG_DIR
|
||||
# see 0002-upgrade-node.feature to view the args.
|
||||
curl -L -O $1
|
||||
chmod +x $CFG_DIR/polkadot
|
||||
echo $(polkadot --version)
|
||||
@@ -0,0 +1,33 @@
|
||||
Description: Smoke / Upgrade Node
|
||||
Network: ./0002-upgrade-node.toml
|
||||
Creds: config
|
||||
|
||||
alice: is up
|
||||
bob: is up
|
||||
charlie: is up
|
||||
dave: is up
|
||||
|
||||
alice: parachain 2000 block height is at least 10 within 200 seconds
|
||||
bob: parachain 2001 block height is at least 10 within 200 seconds
|
||||
|
||||
# upgrade both nodes
|
||||
# For testing using native provider you should set this env var
|
||||
# POLKADOT_PR_BIN_URL=https://gitlab.parity.io/parity/mirrors/polkadot/-/jobs/1842869/artifacts/raw/artifacts/polkadot
|
||||
# with the version of polkadot you want to download.
|
||||
|
||||
# avg 30s in our infra
|
||||
alice: run ./0002-download-polkadot-from-pr.sh with "{{POLKADOT_PR_BIN_URL}}" within 40 seconds
|
||||
bob: run ./0002-download-polkadot-from-pr.sh with "{{POLKADOT_PR_BIN_URL}}" within 40 seconds
|
||||
alice: restart after 5 seconds
|
||||
bob: restart after 5 seconds
|
||||
|
||||
# process bootstrap
|
||||
sleep 30 seconds
|
||||
|
||||
alice: is up within 10 seconds
|
||||
bob: is up within 10 seconds
|
||||
|
||||
|
||||
alice: parachain 2000 block height is at least 30 within 300 seconds
|
||||
bob: parachain 2001 block height is at least 30 within 120 seconds
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
[settings]
|
||||
timeout = 1000
|
||||
|
||||
[relaychain]
|
||||
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
|
||||
chain = "rococo-local"
|
||||
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "alice"
|
||||
args = [ "-lparachain=debug,runtime=debug", "--db paritydb" ]
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "bob"
|
||||
args = [ "-lparachain=debug,runtime=debug", "--db rocksdb" ]
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "charlie"
|
||||
args = [ "-lparachain=debug,runtime=debug", "--db paritydb" ]
|
||||
|
||||
[[relaychain.nodes]]
|
||||
name = "dave"
|
||||
args = [ "-lparachain=debug,runtime=debug", "--db rocksdb" ]
|
||||
|
||||
|
||||
[[parachains]]
|
||||
id = 2000
|
||||
addToGenesis = true
|
||||
|
||||
[parachains.collator]
|
||||
name = "collator01"
|
||||
image = "{{COL_IMAGE}}"
|
||||
command = "undying-collator"
|
||||
args = ["-lparachain=debug"]
|
||||
|
||||
[[parachains]]
|
||||
id = 2001
|
||||
addToGenesis = true
|
||||
|
||||
[parachains.collator]
|
||||
name = "collator02"
|
||||
image = "{{COL_IMAGE}}"
|
||||
command = "undying-collator"
|
||||
args = ["-lparachain=debug"]
|
||||
|
||||
[types.Header]
|
||||
number = "u64"
|
||||
parent_hash = "Hash"
|
||||
post_state = "Hash"
|
||||
Reference in New Issue
Block a user