Skip to content

Commit 5e7ec24

Browse files
committed
Add server-side apply options
This adds patch options related to server-side apply, and moves options to their own file.
1 parent bc64d91 commit 5e7ec24

File tree

3 files changed

+435
-391
lines changed

3 files changed

+435
-391
lines changed

pkg/client/client_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2164,12 +2164,18 @@ var _ = Describe("Client", func() {
21642164

21652165
It("should allow setting Force to 'true'", func() {
21662166
po := &client.PatchOptions{}
2167-
client.PatchWithForce()(po)
2167+
client.ForceOwnership(po)
21682168
mpo := po.AsPatchOptions()
21692169
Expect(mpo.Force).NotTo(BeNil())
21702170
Expect(*mpo.Force).To(BeTrue())
21712171
})
21722172

2173+
It("should allow setting the field manager", func() {
2174+
po := &client.PatchOptions{}
2175+
client.FieldOwner("some-owner")(po)
2176+
Expect(po.AsPatchOptions().FieldManager).To(Equal("some-owner"))
2177+
})
2178+
21732179
It("should produce empty metav1.PatchOptions if nil", func() {
21742180
var po *client.PatchOptions
21752181
Expect(po.AsPatchOptions()).To(Equal(&metav1.PatchOptions{}))

0 commit comments

Comments
 (0)