diff --git a/.openshift-ci/base_qa_e2e_test.py b/.openshift-ci/base_qa_e2e_test.py index e024605c0475c..1b085542afac2 100755 --- a/.openshift-ci/base_qa_e2e_test.py +++ b/.openshift-ci/base_qa_e2e_test.py @@ -14,14 +14,14 @@ from runners import ClusterTestSetsRunner, TestSet -def make_qa_e2e_test_runner(cluster): +def make_qa_e2e_test_runner(cluster, roxie_config=""): return ClusterTestSetsRunner( cluster=cluster, initial_pre_test=PreSystemTests(), sets=[ TestSet( "QA tests part I", - test=QaE2eTestPart1(), + test=QaE2eTestPart1(roxie_config=roxie_config), post=PostClusterTest( check_stackrox_logs=True, artifact_destination_prefix="part-1", diff --git a/.openshift-ci/ci_tests.py b/.openshift-ci/ci_tests.py index b3d602f46e2ec..643b59e1c91df 100755 --- a/.openshift-ci/ci_tests.py +++ b/.openshift-ci/ci_tests.py @@ -83,11 +83,18 @@ def run(self): class QaE2eTestPart1(BaseTest): TEST_TIMEOUT = 240 * 60 + def __init__(self, roxie_config=""): + super().__init__() + self.roxie_config = roxie_config + def run(self): print("Executing qa-tests-backend tests (part I)") + args = ["qa-tests-backend/scripts/run-part-1.sh"] + if self.roxie_config: + args.append(self.roxie_config) self.run_with_graceful_kill( - ["qa-tests-backend/scripts/run-part-1.sh"], self.TEST_TIMEOUT, + args, self.TEST_TIMEOUT, output_dir="/tmp/qa-part1-misc-logs", ) diff --git a/ROXIE_VERSION b/ROXIE_VERSION index 1f77169993b92..224356514aa7f 100644 --- a/ROXIE_VERSION +++ b/ROXIE_VERSION @@ -1 +1 @@ -0.4.13 +0.4.14-test2 diff --git a/qa-tests-backend/scripts/run-part-1.sh b/qa-tests-backend/scripts/run-part-1.sh index 819caaefda26f..0c46e8edf61e0 100755 --- a/qa-tests-backend/scripts/run-part-1.sh +++ b/qa-tests-backend/scripts/run-part-1.sh @@ -25,13 +25,23 @@ source "$ROOT/qa-tests-backend/scripts/workload-identities/workload-identities.s set -euo pipefail run_part_1() { + local roxie_config="${1:-}" + + if [[ -z "$roxie_config" ]]; then + # No roxie config provided by the caller, hence we use a new one. + roxie_config="$(mktemp)" + trap 'rm -f "$roxie_config"' RETURN + fi + info "Starting test (qa-tests-backend part I)" - config_part_1 + config_part_1 "$roxie_config" test_part_1 } config_part_1() { + local roxie_config="${1:-}" + info "Configuring the cluster to run part 1 of e2e tests" require_environment "ORCHESTRATOR_FLAVOR" @@ -65,8 +75,12 @@ config_part_1() { ensure_roxie_on_path - local config_file - config_file="$(mktemp)" + local config_file="$roxie_config" + if [[ -z ${config_file} ]]; then + config_file="$(mktemp)" + # No cleanup trap, we're deep in the call stack and it's not clear if it would be safe to + # override the global exit trap. + fi merge_yaml "$config_file" <