Merge pull request #43499 from liggitt/kubectl-replace-flake

Automatic merge from submit-queue (batch tested with PRs 43513, 43499)

Make kubectl replace unconditional

second attempt at https://github.com/kubernetes/kubernetes/pull/43192

rather than a retry, make the replace unconditional, which works reliably
This commit is contained in:
Kubernetes Submit Queue 2017-03-22 07:46:21 -07:00 committed by GitHub
commit 33eb8794c9

View File

@ -666,14 +666,17 @@ run_pod_tests() {
} }
} }
__EOF__ __EOF__
kubectl-with-retry replace "${kube_flags[@]}" -f <(echo '{ kubectl replace -f - "${kube_flags[@]}" << __EOF__
{
"kind": "Node", "kind": "Node",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {
"name": "node-v1-test", "name": "node-v1-test",
"annotations": {"a":"b"} "annotations": {"a":"b"},
"resourceVersion": "0"
} }
}') }
__EOF__
# Post-condition: the node command succeeds # Post-condition: the node command succeeds
kube::test::get_object_assert "node node-v1-test" "{{.metadata.annotations.a}}" 'b' kube::test::get_object_assert "node node-v1-test" "{{.metadata.annotations.a}}" 'b'