Fixing initscript test for centos-stream

/CoreOS/postfix/Sanity/initscript
This commit is contained in:
Frantisek Hrdina 2023-04-14 10:43:20 +02:00
commit a3b5e380cd

View file

@ -35,7 +35,7 @@ STATUS_LOG="test.log"
SERVICE=$PACKAGE
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "useradd testuserqa" 0 "Add test user"
@ -92,7 +92,7 @@ rlJournalStart
rlLog ">>>>>>>>> insufficient rights"
# Polkit rpm installed is causing that running with insufficient rights returns 1 instead of 4
if ( (rlIsRHEL '>=9' || rlIsFedora) && ! rlCheckRpm 'polkit' ) || rlIsRHEL '<=6' ; then
if ( (rlIsRHEL '>=9' || rlIsFedora || rlIsCentOS '>=9') && ! rlCheckRpm 'polkit' ) || rlIsRHEL '<=6' ; then
ACCESS_DENIED_EXIT_STATUS=4
else
ACCESS_DENIED_EXIT_STATUS=1
@ -116,7 +116,7 @@ rlJournalStart
rlPhaseStartCleanup
rlServiceRestore $SERVICE
rlServiceRestore sendmail
rlRun "userdel -fr testuserqa" 0 "Remove test user"
rlRun "userdel -fr testuserqa" 0 "Remove test user"
rlRun "popd"
rlRun "rm -r $TmpDir"
rlPhaseEnd