@@ -78,7 +78,7 @@ var _ = Describe("Client", func() {
78
78
scheme .AddKnownTypeWithName (ngvk , node )
79
79
80
80
close (done )
81
- })
81
+ }, serverSideTimeoutSeconds )
82
82
83
83
var delOptions * metav1.DeleteOptions
84
84
AfterEach (func (done Done ) {
@@ -100,7 +100,7 @@ var _ = Describe("Client", func() {
100
100
Expect (err ).NotTo (HaveOccurred ())
101
101
}
102
102
close (done )
103
- })
103
+ }, serverSideTimeoutSeconds )
104
104
105
105
Describe ("New" , func () {
106
106
It ("should return a new Client" , func (done Done ) {
@@ -280,10 +280,11 @@ var _ = Describe("Client", func() {
280
280
err = cl .Update (context .TODO (), dep )
281
281
Expect (err ).NotTo (HaveOccurred ())
282
282
283
- By ("validating updated Deployment exists " )
283
+ By ("validating updated Deployment has new annotation " )
284
284
actual , err := clientset .AppsV1 ().Deployments (ns ).Get (dep .Name , metav1.GetOptions {})
285
285
Expect (err ).NotTo (HaveOccurred ())
286
286
Expect (actual ).NotTo (BeNil ())
287
+ Expect (actual .Annotations ["foo" ]).To (Equal ("bar" ))
287
288
288
289
close (done )
289
290
})
@@ -306,10 +307,11 @@ var _ = Describe("Client", func() {
306
307
err = cl .Update (context .TODO (), u )
307
308
Expect (err ).NotTo (HaveOccurred ())
308
309
309
- By ("fetching newly created unstructured Deployment" )
310
+ By ("fetching newly created unstructured Deployment has new annotation " )
310
311
actual , err := clientset .AppsV1 ().Deployments (ns ).Get (dep .Name , metav1.GetOptions {})
311
312
Expect (err ).NotTo (HaveOccurred ())
312
313
Expect (actual ).NotTo (BeNil ())
314
+ Expect (actual .Annotations ["foo" ]).To (Equal ("bar" ))
313
315
314
316
close (done )
315
317
})
@@ -327,10 +329,11 @@ var _ = Describe("Client", func() {
327
329
err = cl .Update (context .TODO (), node )
328
330
Expect (err ).NotTo (HaveOccurred ())
329
331
330
- By ("writing the result back to the go struct " )
332
+ By ("validate updated Node had new annotation " )
331
333
actual , err := clientset .CoreV1 ().Nodes ().Get (node .Name , metav1.GetOptions {})
332
334
Expect (err ).NotTo (HaveOccurred ())
333
335
Expect (actual ).NotTo (BeNil ())
336
+ Expect (actual .Annotations ["foo" ]).To (Equal ("bar" ))
334
337
335
338
close (done )
336
339
})
0 commit comments