Test/api.sh: pass TEST_MODULE_HOTFIXES as an env variable

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 <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-01-12 21:46:38 +01:00 committed by Achilleas Koutsou
parent 17ad9c1165
commit c82c0ae6b5
2 changed files with 6 additions and 4 deletions

View file

@ -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
#