mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Fixes a flaky test, by adding kubectl wait for delete deployment in apply.sh (#89725)
* Add kubectl wait for delete deployment. * Even better to wait for all pods deleted. * get_object_assert -> wait_object_assert
This commit is contained in:
parent
1cf634d24c
commit
3ff54eb10c
@ -80,10 +80,9 @@ run_kubectl_apply_tests() {
|
||||
# Clean up
|
||||
kubectl delete deployments test-deployment-retainkeys "${kube_flags[@]:?}"
|
||||
|
||||
|
||||
## kubectl apply -f with label selector should only apply matching objects
|
||||
# Pre-Condition: no POD exists
|
||||
kube::test::get_object_assert pods "{{range.items}}{{${id_field:?}}}:{{end}}" ''
|
||||
kube::test::wait_object_assert pods "{{range.items}}{{${id_field:?}}}:{{end}}" ''
|
||||
# apply
|
||||
kubectl apply -l unique-label=bingbang -f hack/testdata/filter "${kube_flags[@]:?}"
|
||||
# check right pod exists
|
||||
|
Loading…
Reference in New Issue
Block a user