e2e: check_adjacent accept node number
This commit modifies the logic of the check_adjacent helper so that rather than expecting the argument to be n^2+n it expects simply n. This makes it easier to update the caller when the number of nodes in the cluster changes. Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
This commit is contained in:
@@ -157,7 +157,7 @@ check_ping() {
|
||||
|
||||
check_adjacent() {
|
||||
_kubectl get pods -l app.kubernetes.io/name=curl -o name | xargs -I{} "$KUBECTL_BINARY" --kubeconfig="$KUBECONFIG" exec {} -- /bin/sh -c 'curl -m 1 -s adjacency:8080/?format=fancy'
|
||||
[ "$(curl_pod -m 1 -s adjacency:8080/?format=json | jq | grep -c true)" -eq "$1" ]
|
||||
[ "$(curl_pod -m 1 -s adjacency:8080/?format=json | jq '.[].latencies[].ok' | grep -c true)" -eq $(($1*$1)) ]
|
||||
}
|
||||
|
||||
check_peer() {
|
||||
|
Reference in New Issue
Block a user