Merge pull request #87023 from gavinfish/drfish_cmd_test_apps

Remove workaround for RS bug in cmd apps test
This commit is contained in:
Kubernetes Prow Robot 2020-01-10 14:33:37 -08:00 committed by GitHub
commit 5c3b85a042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -520,13 +520,11 @@ run_rs_tests() {
# Pre-condition: no replica set exists
kube::test::get_object_assert rs "{{range.items}}{{${id_field:?}}}:{{end}}" ''
# Command
#TODO(mortent): Remove this workaround when ReplicaSet bug described in issue #69376 is fixed
local replicaset_name="frontend-no-cascade"
sed -r 's/^(\s*)(name\s*:\s*frontend\s*$)/\1name: '"${replicaset_name:?}"'/' hack/testdata/frontend-replicaset.yaml | kubectl create "${kube_flags[@]:?}" -f -
kubectl create -f hack/testdata/frontend-replicaset.yaml "${kube_flags[@]}"
# wait for all 3 pods to be set up
kube::test::wait_object_assert 'pods -l "tier=frontend"' "{{range.items}}{{${pod_container_name_field:?}}}:{{end}}" 'php-redis:php-redis:php-redis:'
kube::log::status "Deleting rs"
kubectl delete rs "${replicaset_name}" "${kube_flags[@]:?}" --cascade=false
kubectl delete rs frontend "${kube_flags[@]:?}" --cascade=false
# Wait for the rs to be deleted.
kube::test::wait_object_assert rs "{{range.items}}{{${id_field:?}}}:{{end}}" ''
# Post-condition: All 3 pods still remain from frontend replica set