@@ -2719,15 +2719,15 @@ var _ = Describe("Fake client", func() {
2719
2719
obj .SetName ("foo" )
2720
2720
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "data" )).To (Succeed ())
2721
2721
2722
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2722
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2723
2723
2724
2724
cm := & corev1.ConfigMap {ObjectMeta : metav1.ObjectMeta {Name : "foo" }}
2725
2725
2726
2726
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2727
2727
Expect (cm .Data ).To (Equal (map [string ]string {"some" : "data" }))
2728
2728
2729
2729
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"other" : "data" }, "data" )).To (Succeed ())
2730
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2730
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2731
2731
2732
2732
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2733
2733
Expect (cm .Data ).To (Equal (map [string ]string {"other" : "data" }))
@@ -2743,13 +2743,13 @@ var _ = Describe("Fake client", func() {
2743
2743
2744
2744
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "spec" )).To (Succeed ())
2745
2745
2746
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2746
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2747
2747
2748
2748
Expect (cl .Get (ctx , client .ObjectKeyFromObject (result ), result )).To (Succeed ())
2749
2749
Expect (result .Object ["spec" ]).To (Equal (map [string ]any {"some" : "data" }))
2750
2750
2751
2751
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"other" : "data" }, "spec" )).To (Succeed ())
2752
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2752
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2753
2753
2754
2754
Expect (cl .Get (ctx , client .ObjectKeyFromObject (result ), result )).To (Succeed ())
2755
2755
Expect (result .Object ["spec" ]).To (Equal (map [string ]any {"other" : "data" }))
@@ -2763,9 +2763,9 @@ var _ = Describe("Fake client", func() {
2763
2763
obj .SetName ("foo" )
2764
2764
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "data" )).To (Succeed ())
2765
2765
2766
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2766
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2767
2767
2768
- err := cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))
2768
+ err := cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" )) //nolint:staticcheck // will be removed once client.Apply is removed
2769
2769
Expect (err ).To (HaveOccurred ())
2770
2770
Expect (err .Error ()).To (ContainSubstring ("metadata.managedFields must be nil" ))
2771
2771
})
@@ -2781,15 +2781,15 @@ var _ = Describe("Fake client", func() {
2781
2781
2782
2782
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "data" )).To (Succeed ())
2783
2783
2784
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2784
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2785
2785
2786
2786
cm := & corev1.ConfigMap {ObjectMeta : metav1.ObjectMeta {Name : "foo" }}
2787
2787
2788
2788
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2789
2789
Expect (cm .Data ).To (Equal (map [string ]string {"some" : "data" }))
2790
2790
2791
2791
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"other" : "data" }, "data" )).To (Succeed ())
2792
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2792
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2793
2793
2794
2794
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2795
2795
Expect (cm .Data ).To (Equal (map [string ]string {"other" : "data" }))
@@ -2835,7 +2835,7 @@ var _ = Describe("Fake client", func() {
2835
2835
"ssa" : "value" ,
2836
2836
},
2837
2837
}}
2838
- Expect (cl .Patch (ctx , u , client .Apply , client .FieldOwner ("foo" ))).NotTo (HaveOccurred ())
2838
+ Expect (cl .Patch (ctx , u , client .Apply , client .FieldOwner ("foo" ))).NotTo (HaveOccurred ()) //nolint:staticcheck // will be removed once client.Apply is removed
2839
2839
_ , exists , err := unstructured .NestedFieldNoCopy (u .Object , "metadata" , "managedFields" )
2840
2840
Expect (err ).NotTo (HaveOccurred ())
2841
2841
Expect (exists ).To (BeTrue ())
0 commit comments