tests: Do not expect /var/log/secure to be there

This commit is contained in:
Jakub Jelen 2019-01-14 11:44:01 +01:00
parent 40d2a04909
commit ba99e00fe8

View File

@ -39,11 +39,10 @@ SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlFileBackup /etc/ssh/sshd_config /var/log/secure
rlFileBackup /etc/ssh/sshd_config
rlRun "useradd -m $USER"
rlRun "su - $USER -c \"mkdir .ssh; chmod 700 .ssh; cd .ssh; ssh-keygen -N '' -f id_rsa; cat id_rsa.pub >authorized_keys; chmod 600 authorized_keys\""
rlRun "echo 'LogLevel DEBUG' >>/etc/ssh/sshd_config"
rlRun "echo '' >/var/log/secure"
rlServiceStart sshd
rlRun "IP=\$( ip a |grep 'scope global' |grep -w inet |cut -d'/' -f1 |awk '{ print \$2 }' |tail -1 )"
rlRun "echo 'IP=$IP'"
@ -83,10 +82,9 @@ forwarding_test() {
if ! rlGetPhaseState; then
rlRun "cat listen.log"
rlRun "cat tunnel.log"
rlRun "cat /var/log/secure"
fi
rlFileSubmit listen.log tunnel.log /var/log/secure
rlRun "rm -f *.log; echo '' >/var/log/secure"
rlFileSubmit listen.log tunnel.log
rlRun "rm -f *.log;"
}
rlPhaseStartTest "Local forwarding"