File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -788,6 +788,11 @@ func (forceOwnership) ApplyToPatch(opts *PatchOptions) {
788
788
opts .Force = & definitelyTrue
789
789
}
790
790
791
+ func (forceOwnership ) ApplyToSubResourcePatch (opts * SubResourcePatchOptions ) {
792
+ definitelyTrue := true
793
+ opts .Force = & definitelyTrue
794
+ }
795
+
791
796
// }}}
792
797
793
798
// {{{ DeleteAllOf Options
Original file line number Diff line number Diff line change @@ -277,3 +277,18 @@ var _ = Describe("FieldOwner", func() {
277
277
Expect (o .FieldManager ).To (Equal ("foo" ))
278
278
})
279
279
})
280
+
281
+ var _ = Describe ("ForceOwnership" , func () {
282
+ It ("Should apply to PatchOptions" , func () {
283
+ o := & client.PatchOptions {}
284
+ t := client .ForceOwnership
285
+ t .ApplyToPatch (o )
286
+ Expect (o .Force ).To (Equal (true ))
287
+ })
288
+ It ("Should apply to SubResourcePatchOptions" , func () {
289
+ o := & client.SubResourcePatchOptions {PatchOptions : client.PatchOptions {}}
290
+ t := client .ForceOwnership
291
+ t .ApplyToSubResourcePatch (o )
292
+ Expect (o .Force ).To (Equal (true ))
293
+ })
294
+ })
You can’t perform that action at this time.
0 commit comments