diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6574ad417..2fe63effc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -174,123 +174,17 @@ publish-docker-image-description: script: - cd / && sh entrypoint.sh -zombienet-restart-pause-resume: +zombienet-smoke: stage: deploy <<: *kubernetes-env - image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" <<: *common-refs - - variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests" - - before_script: - - echo "Zombienet Tests Logs" - - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - - echo "${GH_DIR}" - - export DEBUG=zombie* - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export COL_IMAGE="docker.io/paritypr/colander:master" - - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --test="0002-restart-pause-resume-node.zndsl" - allow_failure: true - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-logs-assertion: - stage: deploy - <<: *kubernetes-env - image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - <<: *common-refs - - variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests" - - before_script: - - echo "Zombienet Tests Logs" - - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - - echo "${GH_DIR}" - - export DEBUG=zombie* - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export COL_IMAGE="docker.io/paritypr/colander:master" - - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --test="0006-logs.zndsl" - allow_failure: true - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-system-event-assertion: - stage: deploy - <<: *kubernetes-env - image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - <<: *common-refs - - variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests" - - before_script: - - echo "Zombienet Tests System Event" - - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - - echo "${GH_DIR}" - - export DEBUG=zombie* - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export COL_IMAGE="docker.io/paritypr/colander:master" - - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --test="0007-events.zndsl" - allow_failure: true - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-custom-scripts-assertion: - stage: deploy - <<: *kubernetes-env - image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - <<: *common-refs - - variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests" - - before_script: - - echo "Zombienet Tests Custom Scripts (js, sh)" - - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - - echo "${GH_DIR}" - - export DEBUG=zombie* - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export COL_IMAGE="docker.io/paritypr/colander:master" - - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --test="0008-custom-scripts.zndsl" - allow_failure: true - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-histogram-assertion: - stage: deploy - <<: *kubernetes-env image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - # needs: - # - job: publish-docker-pr variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests" + GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests/smoke" before_script: - - echo "Zombienet Tests Histogram" + - echo "Zombienet Smoke Tests" - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - echo "${GH_DIR}" - export DEBUG=zombie* @@ -299,39 +193,8 @@ zombienet-histogram-assertion: script: - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --test="0010-histogram-smoke-test.zndsl" - allow_failure: true - retry: 2 - tags: - - zombienet-polkadot-integration-test - -zombienet-update-genesis-config: - stage: deploy - <<: *kubernetes-env - image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - # needs: - # - job: publish-docker-pr - - variables: - GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests" - - before_script: - - echo "Zombienet Tests Genesis config update" - - echo "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - - echo "${GH_DIR}" - - export DEBUG=zombie* - - export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master" - - export COL_IMAGE="docker.io/paritypr/colander:master" - - script: - - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --test="0011-update-genesis-config.zndsl" - allow_failure: true + --test="0001-smoke.zndsl" + allow_failure: false retry: 2 tags: - zombienet-polkadot-integration-test @@ -339,14 +202,8 @@ zombienet-update-genesis-config: zombienet-scale-net-config: stage: deploy <<: *kubernetes-env + <<: *common-refs image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - # needs: - # - job: publish-docker-pr variables: GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests/scale-net" @@ -370,14 +227,8 @@ zombienet-scale-net-config: zombienet-upgrade-node: stage: deploy <<: *kubernetes-env + <<: *common-refs image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - # needs: - # - job: publish-docker-pr variables: GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests/k8s" @@ -401,14 +252,8 @@ zombienet-upgrade-node: paras: stage: deploy <<: *kubernetes-env + <<: *common-refs image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - # needs: - # - job: publish-docker-pr variables: GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests/paras" @@ -434,14 +279,8 @@ paras: db-snapshot: stage: deploy <<: *kubernetes-env + <<: *common-refs image: "paritypr/zombienet:${CI_COMMIT_SHORT_SHA}" - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - # needs: - # - job: publish-docker-pr variables: GH_DIR: "https://github.com/paritytech/zombienet/tree/${CI_COMMIT_SHORT_SHA}/tests" diff --git a/tests/smoke/0001-smoke.zndsl b/tests/smoke/0001-smoke.zndsl index 34f6a1237..c331eab45 100644 --- a/tests/smoke/0001-smoke.zndsl +++ b/tests/smoke/0001-smoke.zndsl @@ -8,7 +8,7 @@ bob: is up # Logs assertions alice: reports block height is at least 4 within 200 seconds alice: log line contains "Imported #2" within 20 seconds -alice: log line matches glob "*rted #1*" within 10 seconds +alice: log line matches glob "*rted #2*" within 20 seconds alice: log line matches "Imported #[0-9]+" within 10 seconds alice: count of log lines containing "imported" is at least 4 within 10 seconds @@ -35,7 +35,6 @@ alice: restart after 20 seconds sleep 25 seconds alice: is up alice: pause -# Todo add `should fail` support -# alice: is down +sleep 2 seconds alice: resume alice: is up within 120 seconds