Adding cnhages in Sanity-init-scripts-LSB, according to the http://pkgs.devel.redhat.com/cgit/tests/initscripts/commit/

This commit is contained in:
esakaiev 2017-12-19 19:00:08 +02:00
parent b847d3463c
commit b141ea22e9

View File

@ -35,6 +35,7 @@ PACKAGE="initscripts"
SRV_NETCONSOLE=netconsole
SRV_NETFS=netfs
TRG_REMOTEFS=remote-fs.target
SRV_NETWORK=network
rlJournalStart
@ -136,9 +137,46 @@ fi
rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function "
rlServiceRestore $SERVICE
fi #RHEL6 and lower
rlPhaseEnd
else
rlPhaseStartTest "remote-fs target LSB compliance test"
TARGET=$TRG_REMOTEFS
rlServiceStop $TARGET
rlLog ">>>>>>>>> target start"
rlRun "service $TARGET start" 0 " Target must start without problem "
rlRun "service $TARGET status" 0 " Then Status command "
rlRun "service $TARGET start" 0 " Already started target "
rlRun "service $TARGET status" 0 " Again status command "
rlLog ">>>>>>>>> target restart"
rlRun "service $TARGET restart" 0 " Restarting target "
rlRun "service $TARGET status" 0 " Status command "
rlLog ">>>>>>>>> target stop"
rlRun "service $TARGET stop" 0 " Stopping target "
rlRun "service $TARGET status" 3 " Status of stopped target "
rlRun "service $TARGET stop" 0 " Stopping target again "
rlRun "service $TARGET status" 3 " Status of stopped target "
rlLog ">>>>>>>>> insufficient rights"
rlRun "service $TARGET start " 0 " Starting target for restarting under nonpriv user "
rlRun "su testuserqa -c 'service $TARGET restart'" 1 " Insufficient rights, restarting target under nonprivileged user must fail " # returns 1 instead of 4 because of polkit
rlLog ">>>>>>>>> operations"
rlServiceStop $TARGET
rlRun "service $TARGET start" 0 " Target have to implement start function "
rlRun "service $TARGET restart" 0 " Target have to implement restart function "
rlRun "service $TARGET status" 0 " Target have to implement status function "
rlLog ">>>>>>>>> nonexist operations"
rlRun "service $TARGET noexistop" 2 " Testing proper return code when nonexisting function "
rlServiceRestore $TARGET
rlPhaseEnd
fi
# rlPhaseStartTest "$SRV_NETWORK service LSB compliance test"