Skip to content

Commit

Permalink
Tc
Browse files Browse the repository at this point in the history
  • Loading branch information
msune committed Oct 6, 2024
1 parent 287f5ce commit d6ceb0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/cni/check_affinity.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

#
# Check affinity between port 80 and 8080
#
Expand Down Expand Up @@ -41,11 +43,18 @@ check_affinity(){
}

#Wait for nginx to be operative
echo "Waiting for ${LB_IP}:80 to return a valid HTTP response..."
while $( [[ "$(get_pod ${LB_IP}:80 | grep my-nginx-deployment)" == "" ]] ); do
sleep 1
done

#Make sure service at 8080 is also reachable (no misconfigs)
echo "Waiting for ${LB_IP}:8080 to return a valid HTTP response..."
while $( [[ "$(get_pod ${LB_IP}:8080 | grep my-nginx-deployment)" == "" ]] ); do
sleep 1
done

#Check affinity
i=1
while true; do
echo "Iteration ${i}/${ITERATIONS}..."
Expand Down

0 comments on commit d6ceb0d

Please sign in to comment.