Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add async-backing zombienet tests #6314

Merged
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ variables:
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.27"
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.2.78"
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.16"

default:
cache: {}
Expand Down Expand Up @@ -153,6 +153,9 @@ default:
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1

.build-push-image:
extends:
- .kubernetes-env
image: ${BUILDAH_IMAGE}
bredamatt marked this conversation as resolved.
Show resolved Hide resolved
before_script:
- !reference [.job-switcher, before_script]
- test -s ./artifacts/VERSION || exit 1
Expand Down
3 changes: 2 additions & 1 deletion node/network/approval-distribution/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2429,7 +2429,8 @@ fn batch_test_round(message_count: usize) {
.collect();

let peer = PeerId::random();
send_assignments_batched(&mut sender, assignments.clone(), peer, ValidationVersion::V1).await;
send_assignments_batched(&mut sender, assignments.clone(), peer, ValidationVersion::V1)
.await;
send_approvals_batched(&mut sender, approvals.clone(), peer, ValidationVersion::V1).await;

// Check expected assignments batches.
Expand Down
34 changes: 33 additions & 1 deletion scripts/ci/gitlab/pipeline/zombienet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

zombienet-tests-parachains-smoke-test:
stage: zombienet
image: "${ZOMBIENET_IMAGE}"
image: "docker.io/paritytech/zombienet:v1.3.16"
bredamatt marked this conversation as resolved.
Show resolved Hide resolved
bredamatt marked this conversation as resolved.
Show resolved Hide resolved
extends:
- .kubernetes-env
- .zombienet-refs
Expand Down Expand Up @@ -299,3 +299,35 @@ zombienet-tests-beefy-and-mmr:
retry: 2
tags:
- zombienet-polkadot-integration-test

zombienet-tests-async-backing:
stage: zombienet
extends:
- .kubernetes-env
- .zombienet-refs
image: "${ZOMBIENET_IMAGE}"
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/async_backing"
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=${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG}
- export ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE="docker.io/parity/polkadot:${BUILD_RELEASE_VERSION}"
- export COL_IMAGE=${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG}
script:
- /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh
--github-remote-dir="${GH_DIR}"
--test="async-backing.zndsl"
allow_failure: false
retry: 2
tags:
- zombienet-polkadot-integration-test
34 changes: 34 additions & 0 deletions zombienet_tests/async_backing/async-backing-test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[settings]
timeout = 1000

[relaychain]
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}"
chain = "rococo-local"
default_command = "polkadot"

[relaychain.default_resources]
limits = { memory = "4G", cpu = "2" }
requests = { memory = "2G", cpu = "1" }

[[relaychain.nodes]]
name = "alice"
args = [ "-lparachain=debug"]

[[relaychain.nodes]]
name = "bob"
image = "{{ZOMBIENET_INTEGRATION_TEST_SECONDARY_IMAGE}}"
args = [ "-lparachain=debug"]

[[parachains]]
id = 100

[parachains.collator]
name = "collator01"
image = "{{COL_IMAGE}}"
command = "undying-collator"
args = ["-lparachain=debug"]

[types.Header]
number = "u64"
parent_hash = "Hash"
post_state = "Hash"
23 changes: 23 additions & 0 deletions zombienet_tests/async_backing/async-backing.zndsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Description: Async Backing Version Test
Network: ./async-backing-test.toml
Creds: config

# General
alice: is up
bob: is up

# Check authority status
alice: reports node_roles is 4
bob: reports node_roles is 4

# Check peers
alice: reports peers count is at least 2 within 20 seconds
bob: reports peers count is at least 2 within 20 seconds

# Parachain registration
alice: parachain 100 is registered within 225 seconds
bob: parachain 100 is registered within 225 seconds

# Ensure parachain progress
alice: parachain 100 block height is at least 10 within 250 seconds
bob: parachain 100 block height is at least 10 within 250 seconds