rpm-ostree/tests/kola/nondestructive/misc.sh
Colin Walters 770856d018 tests: Start converting some bits into kola ext framework
Start the ball rolling on converting some of our tests into
the coreos-assembler/kola framework:
d940420b78/mantle/kola/README-kola-ext.md

The nondestructive ones are easy.
2020-04-09 23:07:45 +02:00

26 lines
718 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
. ${KOLA_EXT_DATA}/libtest-core.sh
cd $(mktemp -d)
# Verify operations as non-root
runuser -u core rpm-ostree status
echo "ok status doesn't require root"
# StateRoot is only in --verbose
rpm-ostree status > status.txt
assert_not_file_has_content status.txt StateRoot:
rpm-ostree status -v > status.txt
assert_file_has_content status.txt StateRoot:
echo "ok status text"
# Also check that we can do status as non-root non-active
runuser -u bin rpm-ostree status
echo "ok status doesn't require active PAM session"
rpm-ostree status -b > status.txt
assert_streq $(grep -F -e 'ostree://' status.txt | wc -l) "1"
assert_file_has_content status.txt BootedDeployment:
echo "ok status -b"