Skip to content

Commit

Permalink
Merge pull request #1599 from louiznk/fix/test-iperf3
Browse files Browse the repository at this point in the history
Fix waiting for iperf docker is running before launch test
  • Loading branch information
rbrtbnfgl authored Jul 7, 2022
2 parents 0716f94 + 3b5004c commit 20accb9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dist/functional-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,18 @@ perf() {
# Perf test - run iperf server on flannel1 and client on flannel2
docker rm -f flannel-e2e-test-flannel1-iperf 2>/dev/null
docker run -d --name flannel-e2e-test-flannel1-iperf --net=container:flannel-e2e-test-flannel1 iperf3:latest >/dev/null
wait_for flannel-e2e-test-flannel1-iperf
docker run --rm --net=container:flannel-e2e-test-flannel2 iperf3:latest -c $ping_dest1 -B $ping_dest2
}

wait_for() {
while ! docker inspect --format='{{json .State.Status}}' $1 >/dev/null
do
sleep 1
done
}


test_multi() {
flannel_conf_vxlan='{"Network": "10.11.0.0/16", "Backend": {"Type": "vxlan"}}'
flannel_conf_host_gw='{"Network": "10.12.0.0/16", "Backend": {"Type": "host-gw"}}'
Expand Down

0 comments on commit 20accb9

Please sign in to comment.