From c82c0ae6b5457e0258df898dc0a805f73daa0a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Fri, 12 Jan 2024 21:46:38 +0100 Subject: [PATCH] Test/api.sh: pass TEST_MODULE_HOTFIXES as an env variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While I was the one to push for TEST_MODULE_HOTFIXES to be passed as an argument to `api.sh`, when it was implemented, this is turning our to be impractical. I would like to extend `api.sh` to test distro names with and without the dot to separate major and minor version and also to test the ability to specify distro name explicitly (e.g. a distro alias). Passing all of these new options and their combinations would make the CLI go wild. Signed-off-by: Tomáš Hozza --- .gitlab-ci.yml | 2 +- test/cases/api.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c9ae510b..86b98fddc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -551,7 +551,7 @@ API-module-hotfixes: # don't run this test case for nightly trees script: - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/api.sh "${IMAGE_TYPE}" "" "${TEST_MODULE_HOTFIXES}" + - /usr/libexec/tests/osbuild-composer/api.sh "${IMAGE_TYPE}" parallel: matrix: - IMAGE_TYPE: diff --git a/test/cases/api.sh b/test/cases/api.sh index da242dfad..8b6ef0729 100755 --- a/test/cases/api.sh +++ b/test/cases/api.sh @@ -33,8 +33,8 @@ export IMAGE_TYPE_OCI="oci" export IMAGE_TYPE_VSPHERE="vsphere" export IMAGE_TYPE_IOT_COMMIT="iot-commit" -if (( $# > 3 )); then - echo "$0 does not support more than three arguments" +if (( $# > 2 )); then + echo "$0 does not support more than two arguments" exit 1 fi @@ -46,7 +46,9 @@ fi set -euo pipefail IMAGE_TYPE="$1" -TEST_MODULE_HOTFIXES="${3:-0}" + +# set TEST_MODULE_HOTFIXES to 1 to enable module hotfixes for the test +TEST_MODULE_HOTFIXES="${TEST_MODULE_HOTFIXES:-0}" # select cloud provider based on image type #