mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Merge pull request #11139 from wojtek-t/fix_shell_services_test
Fix shell Services e2e test
This commit is contained in:
commit
d386a87a90
@ -79,6 +79,22 @@ function make_namespace() {
|
|||||||
__EOF__
|
__EOF__
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wait_for_apiserver() {
|
||||||
|
echo "Waiting for apiserver to be up"
|
||||||
|
|
||||||
|
local i
|
||||||
|
for i in $(seq 1 12); do
|
||||||
|
results=($(ssh-to-node "${master}" "
|
||||||
|
wget -q -T 1 -O - http://localhost:8080/healthz || true
|
||||||
|
"))
|
||||||
|
if [[ "${results}" == "ok" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
sleep 5 # wait for apiserver to restart
|
||||||
|
done
|
||||||
|
error "restarting apiserver timed out"
|
||||||
|
}
|
||||||
|
|
||||||
# Args:
|
# Args:
|
||||||
# $1: service name
|
# $1: service name
|
||||||
# $2: service port
|
# $2: service port
|
||||||
@ -420,7 +436,7 @@ verify_from_container "${svc3_name}" "${svc3_ip}" "${svc3_port}" \
|
|||||||
echo "Test 6: Restart the master, make sure VIPs come back."
|
echo "Test 6: Restart the master, make sure VIPs come back."
|
||||||
echo "Restarting the master"
|
echo "Restarting the master"
|
||||||
restart-apiserver "${master}"
|
restart-apiserver "${master}"
|
||||||
sleep 5
|
wait_for_apiserver
|
||||||
echo "Verifying the VIPs from the host"
|
echo "Verifying the VIPs from the host"
|
||||||
wait_for_service_up "${svc3_name}" "${svc3_ip}" "${svc3_port}" \
|
wait_for_service_up "${svc3_name}" "${svc3_ip}" "${svc3_port}" \
|
||||||
"${svc3_count}" "${svc3_pods}"
|
"${svc3_count}" "${svc3_pods}"
|
||||||
@ -457,6 +473,4 @@ echo "Verifying the VIPs from a container"
|
|||||||
verify_from_container "${svc4_name}" "${svc4_ip}" "${svc4_port}" \
|
verify_from_container "${svc4_name}" "${svc4_ip}" "${svc4_port}" \
|
||||||
"${svc4_count}" "${svc4_pods}"
|
"${svc4_count}" "${svc4_pods}"
|
||||||
|
|
||||||
# TODO: test createExternalLoadBalancer
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user