Skip to content

Commit

Permalink
add support in QM image
Browse files Browse the repository at this point in the history
In case QM already runnig as a service
tests/e2e/set-ffi-env-e2e will exit 0
in case service does not exist,
it will contine
In case of ostree image script will exit

Signed-off-by: Yariv Rachmani <yrachman@redhat.com>
  • Loading branch information
Yarboa committed Aug 22, 2024
1 parent 615ffcb commit 01dd3d5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/e2e/set-ffi-env-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,28 @@ then
exit
fi

echo
info_message "Checking if QM already installed"
info_message "=============================="
QM_STATUS="$(systemctl is-enabled qm 2>&1)"
if [ "$QM_STATUS" == "genrated" ]; then
if [ "$(systemctl is-active qm)" == "active" ];then
info_message "QM Enabled and Active"
info_message "=============================="
exit 0
else
info_message "QM Enabled and not Active"
info_message "=============================="
exit 1
fi
fi

if stat /run/ostree-booted > /dev/null 2>&1; then
info_message "script can not run on ostree image"
info_message "=============================="
exit 1
fi

info_message "Cleaning any previous e2e files"
info_message "=============================="
cleanup
Expand Down

0 comments on commit 01dd3d5

Please sign in to comment.