Skip to content

Commit ab3dbdd

Browse files
committed
Use an unknown field in the test, since networkPolicy will be part of v0.18.0
1 parent 60b87f3 commit ab3dbdd

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

internal/controller/argo_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ var _ = Describe("CreateOrUpdateArgoCD", func() {
10321032
"resourceVersion": "1",
10331033
},
10341034
"spec": map[string]any{
1035-
"networkPolicy": map[string]any{
1035+
"someCustomPlugin": map[string]any{
10361036
"enabled": true,
10371037
},
10381038
"imageUpdater": map[string]any{
@@ -1052,12 +1052,12 @@ var _ = Describe("CreateOrUpdateArgoCD", func() {
10521052
argoCD, err := dynamicClient.Resource(gvr).Namespace(namespace).Get(context.TODO(), name, metav1.GetOptions{})
10531053
Expect(err).ToNot(HaveOccurred())
10541054

1055-
// networkPolicy should be preserved — it is managed by gitops-operator
1056-
// not by patterns-operator, so the update must not strip it
1057-
networkPolicy, found, err := unstructured.NestedMap(argoCD.Object, "spec", "networkPolicy")
1055+
// someCustomPlugin should be preserved — it is not managed by
1056+
// patterns-operator, so the update must not strip it
1057+
someCustomPlugin, found, err := unstructured.NestedMap(argoCD.Object, "spec", "someCustomPlugin")
10581058
Expect(err).ToNot(HaveOccurred())
1059-
Expect(found).To(BeTrue(), "networkPolicy should be preserved after update")
1060-
Expect(networkPolicy["enabled"]).To(BeTrue())
1059+
Expect(found).To(BeTrue(), "someCustomPlugin should be preserved after update")
1060+
Expect(someCustomPlugin["enabled"]).To(BeTrue())
10611061

10621062
// imageUpdater should also be preserved
10631063
imageUpdater, found, err := unstructured.NestedMap(argoCD.Object, "spec", "imageUpdater")

0 commit comments

Comments
 (0)