Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
e2e: Change from jsonPatch to MergePatch (former does not apply witho…
Browse files Browse the repository at this point in the history
…ut error)
  • Loading branch information
aaronlevy committed Oct 6, 2017
1 parent 800ca0f commit 9ca7503
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/checkpointer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ func TestCheckpointerUnscheduleCheckpointer(t *testing.T) {
}

// Delete the pod checkpointer on the worker node by updating the daemonset.
patch = `[{"op": "replace", "path": "/spec/template/spec/nodeSelector", "value": {"node-role.kubernetes.io/master":""}}]`
_, err = client.ExtensionsV1beta1().DaemonSets("kube-system").Patch("pod-checkpointer", types.JSONPatchType, []byte(patch))
patch = `{"spec":{"template":{"spec":{"nodeSelector":{"node-role.kubernetes.io/master":""}}}}}`
_, err = client.ExtensionsV1beta1().DaemonSets("kube-system").Patch("pod-checkpointer", types.MergePatchType, []byte(patch))
if err != nil {
t.Fatalf("Failed to patch checkpointer: %v", err)
}
Expand Down Expand Up @@ -352,8 +352,8 @@ func TestCheckpointerUnscheduleParent(t *testing.T) {
}

// Delete test pod on the workers.
patch = `[{"op": "replace", "path": "/spec/template/spec/nodeSelector", "value": {"node-role.kubernetes.io/master":""}}]`
_, err = client.ExtensionsV1beta1().DaemonSets(testNS).Patch("nginx-daemonset", types.JSONPatchType, []byte(patch))
patch = `{"spec":{"template":{"spec":{"nodeSelector":{"node-role.kubernetes.io/master":""}}}}}`
_, err = client.ExtensionsV1beta1().DaemonSets(testNS).Patch("nginx-daemonset", types.MergePatchType, []byte(patch))
if err != nil {
t.Fatalf("unable to patch daemonset: %v", err)
}
Expand Down

0 comments on commit 9ca7503

Please sign in to comment.