shadow-utils/tests/sanity/runtest.sh
Steeve Goveas d3db3c8cb5 Enable gating tests for shadow-utils
Resolves: rhbz#1962811

Files from test directory are updated from the internal 8.5.0 repo
2021-05-28 21:17:33 +05:30

29 lines
548 B
Bash
Executable File

#!/bin/bash
. /usr/bin/rhts-environment.sh
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlFileBackup --clean /etc/default/useradd- /etc/default/useradd /etc/nsswitch.conf
setenforce 0
# We do not want sssd to interfere
for i in passwd group shadow ; do
sed -i "s/^$i:.*/$i: files/" /etc/nsswitch.conf
done
python3 sanity_test.py -v
setenforce 1
rlFileRestore
EXIT=$?
if [[ $EXIT -eq 0 ]]; then
RESULT="PASS"
else
RESULT="FAIL"
fi
rlJournalEnd
echo "Result: $RESULT"
echo "Exit: $EXIT"
report_result $TEST $RESULT $EXIT