Merge #9 Fixing sanity-test

This commit is contained in:
Frantisek Hrdina 2023-08-30 13:29:49 +00:00
commit 28fcc4e02e

View file

@ -32,14 +32,21 @@ PACKAGE="iperf3"
rlJournalStart
rlPhaseStartSetup
rlAssertRequired
rlAssertRpm "$PACKAGE"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun -s "iperf3 -c localhost" 1 "Client should fail when no server is listening."
rlAssertGrep "iperf3: error - unable to connect to server: Connection refused|iperf3: error - unable to send control message: Bad file descriptor" $rlRun_LOG -E
if rlIsFedora; then
MESSAGE="iperf3: error - unable to connect to server - server may have stopped running or use a different port, firewall issue, etc.: Connection refused"
elif rlIsRHEL '>=9' || rlIsCentOS '>=9'; then
MESSAGE="iperf3: error - unable to send control message: Bad file descriptor"
else
MESSAGE="iperf3: error - unable to connect to server: Connection refused"
fi
rlAssertGrep "$MESSAGE" $rlRun_LOG -E
rm -f $rlRun_LOG
rlRun "iperf3 -D -s -1"