Skip to content

Commit 1f07842

Browse files
committed
test(net): check output in test_high_ingress_traffic
If we supply an invalid iperf binary to the test it still passes. This adds checks for the command output. While doing that, increase the timeout to let the command finish without hitting it. Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent 8c712d2 commit 1f07842

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integration_tests/functional/test_net.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def test_high_ingress_traffic(uvm_plain_any):
3333
test_microvm.start()
3434

3535
# Start iperf3 server on the guest.
36-
test_microvm.ssh.run("{} -sD\n".format(IPERF_BINARY))
36+
test_microvm.ssh.check_output("{} -sD\n".format(IPERF_BINARY))
3737
time.sleep(1)
3838

3939
# Start iperf3 client on the host. Send 1Gbps UDP traffic.
4040
# If the net device breaks, iperf will freeze. We have to use a timeout.
41-
utils.run_cmd(
42-
"timeout 30 {} {} -c {} -u -V -b 1000000000 -t 30".format(
41+
utils.check_output(
42+
"timeout 31 {} {} -c {} -u -V -b 1000000000 -t 30".format(
4343
test_microvm.netns.cmd_prefix(),
4444
IPERF_BINARY,
4545
guest_ip,

0 commit comments

Comments
 (0)