@@ -128,3 +128,30 @@ var _ = Describe("DeleteOptions", func() {
128
128
Expect (newDeleteOpts ).To (Equal (o ))
129
129
})
130
130
})
131
+
132
+ var _ = Describe ("UpdateOptions" , func () {
133
+ It ("Should set DryRun" , func () {
134
+ o := & client.UpdateOptions {DryRun : []string {"Bye" , "Pippa" }}
135
+ newUpdateOpts := & client.UpdateOptions {}
136
+ o .ApplyToUpdate (newUpdateOpts )
137
+ Expect (newUpdateOpts ).To (Equal (o ))
138
+ })
139
+ It ("Should set FieldManager" , func () {
140
+ o := & client.UpdateOptions {FieldManager : "Hello Boris" }
141
+ newUpdateOpts := & client.UpdateOptions {}
142
+ o .ApplyToUpdate (newUpdateOpts )
143
+ Expect (newUpdateOpts ).To (Equal (o ))
144
+ })
145
+ It ("Should set Raw" , func () {
146
+ o := & client.UpdateOptions {Raw : & metav1.UpdateOptions {}}
147
+ newUpdateOpts := & client.UpdateOptions {}
148
+ o .ApplyToUpdate (newUpdateOpts )
149
+ Expect (newUpdateOpts ).To (Equal (o ))
150
+ })
151
+ It ("Should not set anything" , func () {
152
+ o := & client.UpdateOptions {}
153
+ newUpdateOpts := & client.UpdateOptions {}
154
+ o .ApplyToUpdate (newUpdateOpts )
155
+ Expect (newUpdateOpts ).To (Equal (o ))
156
+ })
157
+ })
0 commit comments