@@ -2548,15 +2548,15 @@ var _ = Describe("Fake client", func() {
2548
2548
obj .SetName ("foo" )
2549
2549
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "data" )).To (Succeed ())
2550
2550
2551
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2551
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2552
2552
2553
2553
cm := & corev1.ConfigMap {ObjectMeta : metav1.ObjectMeta {Name : "foo" }}
2554
2554
2555
2555
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2556
2556
Expect (cm .Data ).To (Equal (map [string ]string {"some" : "data" }))
2557
2557
2558
2558
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"other" : "data" }, "data" )).To (Succeed ())
2559
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2559
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2560
2560
2561
2561
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2562
2562
Expect (cm .Data ).To (Equal (map [string ]string {"other" : "data" }))
@@ -2572,13 +2572,13 @@ var _ = Describe("Fake client", func() {
2572
2572
2573
2573
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "spec" )).To (Succeed ())
2574
2574
2575
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2575
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2576
2576
2577
2577
Expect (cl .Get (ctx , client .ObjectKeyFromObject (result ), result )).To (Succeed ())
2578
2578
Expect (result .Object ["spec" ]).To (Equal (map [string ]any {"some" : "data" }))
2579
2579
2580
2580
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"other" : "data" }, "spec" )).To (Succeed ())
2581
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2581
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2582
2582
2583
2583
Expect (cl .Get (ctx , client .ObjectKeyFromObject (result ), result )).To (Succeed ())
2584
2584
Expect (result .Object ["spec" ]).To (Equal (map [string ]any {"other" : "data" }))
@@ -2592,9 +2592,9 @@ var _ = Describe("Fake client", func() {
2592
2592
obj .SetName ("foo" )
2593
2593
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "data" )).To (Succeed ())
2594
2594
2595
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2595
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2596
2596
2597
- err := cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))
2597
+ err := cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" )) //nolint:staticcheck // will be removed once client.Apply is removed
2598
2598
Expect (err ).To (HaveOccurred ())
2599
2599
Expect (err .Error ()).To (ContainSubstring ("metadata.managedFields must be nil" ))
2600
2600
})
@@ -2610,15 +2610,15 @@ var _ = Describe("Fake client", func() {
2610
2610
2611
2611
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"some" : "data" }, "data" )).To (Succeed ())
2612
2612
2613
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2613
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2614
2614
2615
2615
cm := & corev1.ConfigMap {ObjectMeta : metav1.ObjectMeta {Name : "foo" }}
2616
2616
2617
2617
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2618
2618
Expect (cm .Data ).To (Equal (map [string ]string {"some" : "data" }))
2619
2619
2620
2620
Expect (unstructured .SetNestedField (obj .Object , map [string ]any {"other" : "data" }, "data" )).To (Succeed ())
2621
- Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ())
2621
+ Expect (cl .Patch (ctx , obj , client .Apply , client .FieldOwner ("foo" ))).To (Succeed ()) //nolint:staticcheck // will be removed once client.Apply is removed
2622
2622
2623
2623
Expect (cl .Get (ctx , client .ObjectKeyFromObject (cm ), cm )).To (Succeed ())
2624
2624
Expect (cm .Data ).To (Equal (map [string ]string {"other" : "data" }))
@@ -2664,7 +2664,7 @@ var _ = Describe("Fake client", func() {
2664
2664
"ssa" : "value" ,
2665
2665
},
2666
2666
}}
2667
- Expect (cl .Patch (ctx , u , client .Apply , client .FieldOwner ("foo" ))).NotTo (HaveOccurred ())
2667
+ Expect (cl .Patch (ctx , u , client .Apply , client .FieldOwner ("foo" ))).NotTo (HaveOccurred ()) //nolint:staticcheck // will be removed once client.Apply is removed
2668
2668
_ , exists , err := unstructured .NestedFieldNoCopy (u .Object , "metadata" , "managedFields" )
2669
2669
Expect (err ).NotTo (HaveOccurred ())
2670
2670
Expect (exists ).To (BeTrue ())
0 commit comments