From 0c15cbd09cbd4d38a6c8b34bce34d8f741f61a4a Mon Sep 17 00:00:00 2001 From: Justin Cinkelj Date: Fri, 23 Jan 2026 14:27:07 +0100 Subject: [PATCH 1/5] Fix typo in DEVELOPMENT.md Signed-off-by: Justin Cinkelj --- DEVELOPMENT.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 29667327..739e1359 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -231,7 +231,7 @@ ScaleComputing does setup new VSNS, with suitable HyperCore version installed. Steps: - Request / reserve static IP address from Alex - - either replacing existing static IP or using next in series 105.11.20x + - either replacing existing static IP or using next in series 10.5.11.20x - create empty VM with 1 virtio disk, type other, tag hc3nested, 16GB ram, 4 cores. - image new vSNS node using test iso image (vs. release - this may change in upcoming releases) - (optional) Save it as template VM, example name `vsns9213-unconfigured` @@ -240,6 +240,7 @@ Steps: - `sudo singleNodeCluster=1 scclusterinit` - Save it as template VM, example name `vsns9213-template` - Create a final vSNS from template VM, example name `vsns9213-ci` + - keep same MAC address? - Add vSNS login URL to Azure OIDC redirectUris - ensure ip address is added to entraAD (azure) app registration for OIDC integration (ask Dave if needed) - "app_display_name": "Scale Computing HC3", From c08a6c028e0b624d4d2332ad774472c0d57b0d5b Mon Sep 17 00:00:00 2001 From: Justin Cinkelj Date: Fri, 23 Jan 2026 14:27:47 +0100 Subject: [PATCH 2/5] Document run-tests.sh - helper to re-test failed integration tests easily Signed-off-by: Justin Cinkelj --- DEVELOPMENT.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 739e1359..7dabda9b 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -213,6 +213,33 @@ Sample ansible.cfg is there to ensure collection does not need to be installed. ansible-playbook -i localhost, examples/iso_info.yml -v ``` +## Running integration tests + +The `ansible-test integration` will try to run all integration test, and will fail on first problematic test. +It does allow you to continue from the failed test. + +You might want to automatically continue running remaining tests. +A few failed tests can be reviewed and retried later. +The `./ci-infra/helpers/run-tests.sh` was made for this. +If N tests fail in first pass, the `run-tests.sh` will retry only those N test in second pass. +The script is used like: + +```bash +source ci-infra/local-dev/env-host-4.sh +./ci-infra/helpers/run-tests.sh outdir +``` + +File `tests.txt` is optional input. +It contains one test name per line. +If ommited, all tests from `tests/integration` are run. + +After run, the scripts create in `outd` directory: + +- directory `log-${timestamp}` directory containing a log file for each run test +- file `status.txt` contains OK/ERR/PEND/SKIP status for each run test + +On next run, only tests that have PEND/ERR status are retried. + ## Creating a release Releases are automatically created when a tag is created with a name matching From 09cec227673a6cea5800178fed48f1a1b3caba50 Mon Sep 17 00:00:00 2001 From: Justin Cinkelj Date: Fri, 23 Jan 2026 17:23:31 +0100 Subject: [PATCH 3/5] CI how to prepare HC3 host for integration tests Signed-off-by: Justin Cinkelj --- DEVELOPMENT.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 7dabda9b..4509b4b8 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -215,6 +215,15 @@ ansible-playbook -i localhost, examples/iso_info.yml -v ## Running integration tests +Some test objects (ISO image, VirtualDisk, VM) needs to be created before we run integration tests. +Use command: + +```bash +ansible-playbook -i localhost, tests/integration/prepare/prepare_vm.yml -v +ansible-playbook -i localhost, tests/integration/prepare/prepare_iso.yml -v +ansible-playbook -i localhost, tests/integration/prepare/prepare_examples.yml -v +``` + The `ansible-test integration` will try to run all integration test, and will fail on first problematic test. It does allow you to continue from the failed test. From 578cd4f6350965a79c29af5f057ac51de11c536c Mon Sep 17 00:00:00 2001 From: Justin Cinkelj Date: Mon, 26 Jan 2026 07:57:03 +0100 Subject: [PATCH 4/5] Print test progress - number and total count Signed-off-by: Justin Cinkelj --- ci-infra/helpers/run-tests.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci-infra/helpers/run-tests.sh b/ci-infra/helpers/run-tests.sh index 293992f1..8db1192d 100755 --- a/ci-infra/helpers/run-tests.sh +++ b/ci-infra/helpers/run-tests.sh @@ -40,14 +40,17 @@ then echo "ERROR file content $TSTATUS" 1>&2 exit 1 fi +/bin/cp "$TSTATUS" "$OUTD2/status.txt" TEST_NAMES=$(grep "^PEND" "$TSTATUS" | awk '{print $2}') # shellcheck disable=SC2086 echo "Pending tests: "$TEST_NAMES # shellcheck disable=SC2086 +TEST_COUNT=$(echo $TEST_NAMES | wc -w) +ii=0 for TN in $TEST_NAMES do - echo "Running test $TN" + echo "Running test $TN ($ii/$TEST_COUNT)" ( echo ansible-test integration --local "$TN" echo "======================" @@ -67,4 +70,5 @@ do ) >"$OUTD2/$TN.log" 2>&1 res=$(grep $'\t'"$TN\$" "$TSTATUS" | awk '{print $1}') echo " result $res $TN" + ii=$((ii+1)) done From 7489859b45b8c74dd4b17bfdcff82472103c09c2 Mon Sep 17 00:00:00 2001 From: Justin Cinkelj Date: Mon, 26 Jan 2026 07:57:45 +0100 Subject: [PATCH 5/5] Auto retry failed test if there are no pending tests Signed-off-by: Justin Cinkelj --- ci-infra/helpers/run-tests.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ci-infra/helpers/run-tests.sh b/ci-infra/helpers/run-tests.sh index 8db1192d..860ad7f4 100755 --- a/ci-infra/helpers/run-tests.sh +++ b/ci-infra/helpers/run-tests.sh @@ -5,6 +5,7 @@ # Input: # - outdir will contain status/progress file, and log files of individual tests # - (optional) test-names.txt contains integration tests to be run, one per line. +# If not given, all tests in tests/integration/targets/ are run. # Output: # - logs are one test per file, in outdir/log-timestamp/ # - list of succeded/failed tests are in outdir/status.txt @@ -12,6 +13,8 @@ # - PEND (or contains just test name), test will be run # - SKIP means skip this test # - OK or ERR are set after test is run +# On second run, only PEND tests are run. +# If there are no PEND tests, the ERR tests are retried. set -ue # set -v @@ -43,10 +46,22 @@ fi /bin/cp "$TSTATUS" "$OUTD2/status.txt" TEST_NAMES=$(grep "^PEND" "$TSTATUS" | awk '{print $2}') +if [ -z "$TEST_NAMES" ] +then + echo "No PEND tests, retrying ERR tests" + sed -i 's/^ERR/PEND/' "$TSTATUS" +fi +TEST_NAMES=$(grep "^PEND" "$TSTATUS" | awk '{print $2}') +if [ -z "$TEST_NAMES" ] +then + echo "No tests to run, exiting." + exit 0 +fi # shellcheck disable=SC2086 echo "Pending tests: "$TEST_NAMES # shellcheck disable=SC2086 TEST_COUNT=$(echo $TEST_NAMES | wc -w) + ii=0 for TN in $TEST_NAMES do