From 410baf3dbc58c3afcfbc81aecf3fa2621b0faf2f Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Sun, 3 Nov 2024 14:27:12 -0600 Subject: [PATCH] test the current installer against the existing releases --- crucible-install.sh | 2 +- tests/test-installer | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/crucible-install.sh b/crucible-install.sh index a00491f..23b23f1 100755 --- a/crucible-install.sh +++ b/crucible-install.sh @@ -193,7 +193,7 @@ function list_releases { git ls-remote --tags \ --sort='version:refname' \ https://github.com/perftool-incubator/crucible.git \ - | awk -F/ '{print$NF}' | + | awk -F/ '{print$NF}' \ | grep -E '20[0-9]{2}\.[1234]' } diff --git a/tests/test-installer b/tests/test-installer index 24b7e3e..eae324f 100755 --- a/tests/test-installer +++ b/tests/test-installer @@ -208,3 +208,23 @@ sudo ./crucible-install.sh \ --verbose test "$?" = "$ec" || exit 1 stop_test + +for arg_mode in client-server engine; do + for tag in $tags; do + start_test + echo "testing arg_mode=${arg_mode} tag=${tag}" + # install existing release with current installer + touch /tmp/auth-file.json + cfgfile=$(grep SYSCONFIG= crucible-install.sh | cut -d '=' -f2 | sed 's/"//g') + # TODO(rfolco): temporary workaround until we make it distro generic + sudo mkdir -p $(dirname $cfgfile) + sudo ./crucible-install.sh \ + --release $tag \ + --${arg_mode}-registry myregistry.io/crucible \ + --${arg_mode}-auth-file /tmp/auth-file.json \ + --verbose + test "$?" = "0" || exit 1 + ls /opt/crucible-moved* || exit 1 + stop_test + done +done