@@ -215,8 +215,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
215
215
o .Expect (err ).NotTo (o .HaveOccurred ())
216
216
217
217
g .By (fmt .Sprintf ("by checking that the second deployment exists" ))
218
- // TODO when #11016 gets fixed this can be reverted to 30seconds
219
- err = wait .PollImmediate (500 * time .Millisecond , 5 * time .Minute , func () (bool , error ) {
218
+ err = wait .PollImmediate (500 * time .Millisecond , 30 * time .Second , func () (bool , error ) {
220
219
_ , rcs , _ , err := deploymentInfo (oc , dcName )
221
220
if err != nil {
222
221
return false , nil
@@ -292,7 +291,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
292
291
o .Expect (is .Status .Tags ["direct" ].Items ).NotTo (o .BeEmpty ())
293
292
o .Expect (is .Status .Tags ["pullthrough" ].Items ).NotTo (o .BeEmpty ())
294
293
295
- dc , err = oc .AppsClient ().Apps ().DeploymentConfigs (oc .Namespace ()).Get (name , metav1.GetOptions {})
294
+ dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (oc .Namespace ()).Get (name , metav1.GetOptions {})
296
295
o .Expect (err ).NotTo (o .HaveOccurred ())
297
296
o .Expect (dc .Spec .Triggers ).To (o .HaveLen (3 ))
298
297
@@ -350,7 +349,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
350
349
})
351
350
352
351
g .By ("verifying the scale is updated on the deployment config" )
353
- config , err := oc .AppsClient ().Apps ().DeploymentConfigs (oc .Namespace ()).Get ("deployment-test" , metav1.GetOptions {})
352
+ config , err := oc .AppsClient ().AppsV1 ().DeploymentConfigs (oc .Namespace ()).Get ("deployment-test" , metav1.GetOptions {})
354
353
o .Expect (err ).NotTo (o .HaveOccurred ())
355
354
o .Expect (config .Spec .Replicas ).Should (o .BeEquivalentTo (1 ))
356
355
o .Expect (config .Spec .Test ).Should (o .BeTrue ())
@@ -403,11 +402,11 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
403
402
o .Expect (err ).NotTo (o .HaveOccurred ())
404
403
405
404
expectLatestVersion := func (version int ) {
406
- dc , err := oc .AppsClient ().Apps ().DeploymentConfigs (oc .Namespace ()).Get (dcName , metav1.GetOptions {})
405
+ dc , err := oc .AppsClient ().AppsV1 ().DeploymentConfigs (oc .Namespace ()).Get (dcName , metav1.GetOptions {})
407
406
o .Expect (err ).NotTo (o .HaveOccurred ())
408
407
latestVersion := dc .Status .LatestVersion
409
408
err = wait .PollImmediate (500 * time .Millisecond , 10 * time .Second , func () (bool , error ) {
410
- dc , err = oc .AppsClient ().Apps ().DeploymentConfigs (oc .Namespace ()).Get (dcName , metav1.GetOptions {})
409
+ dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (oc .Namespace ()).Get (dcName , metav1.GetOptions {})
411
410
o .Expect (err ).NotTo (o .HaveOccurred ())
412
411
latestVersion = dc .Status .LatestVersion
413
412
return latestVersion == int64 (version ), nil
@@ -783,15 +782,12 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
783
782
o .Expect (fmt .Errorf ("expected no deployment, found %#v" , rcs [0 ])).NotTo (o .HaveOccurred ())
784
783
}
785
784
786
- _ , err = updateConfigWithRetries (oc .AppsClient ().Apps (), oc .Namespace (), dcName , func (dc * appsv1.DeploymentConfig ) {
787
- // TODO: oc rollout pause should patch instead of making a full update
788
- dc .Spec .Paused = false
789
- })
785
+ dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (oc .Namespace ()).Patch (dcName , types .StrategicMergePatchType , []byte (`{"spec": {"paused": false}}` ))
790
786
o .Expect (err ).NotTo (o .HaveOccurred ())
791
787
o .Expect (waitForLatestCondition (oc , dcName , deploymentRunTimeout , deploymentReachedCompletion )).NotTo (o .HaveOccurred ())
792
788
793
789
g .By ("making sure it updates observedGeneration after being paused" )
794
- dc , err = oc .AppsClient ().Apps ().DeploymentConfigs (oc .Namespace ()).Patch (dcName , types .StrategicMergePatchType , []byte (`{"spec": {"paused": true}}` ))
790
+ dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (oc .Namespace ()).Patch (dcName , types .StrategicMergePatchType , []byte (`{"spec": {"paused": true}}` ))
795
791
o .Expect (err ).NotTo (o .HaveOccurred ())
796
792
797
793
_ , err = waitForDCModification (oc , dc .Namespace , dcName , deploymentChangeTimeout ,
@@ -1015,9 +1011,6 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
1015
1011
o .Expect (err ).NotTo (o .HaveOccurred ())
1016
1012
1017
1013
o .Expect (dc .Spec .Triggers ).To (o .BeNil ())
1018
- // FIXME: remove when tests are migrated to the new client
1019
- // (the old one incorrectly translates nil into an empty array)
1020
- dc .Spec .Triggers = append (dc .Spec .Triggers , appsv1.DeploymentTriggerPolicy {Type : appsv1 .DeploymentTriggerOnConfigChange })
1021
1014
// This is the last place we can safely say that the time was taken before replicas became ready
1022
1015
startTime := time .Now ()
1023
1016
dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (namespace ).Create (dc )
@@ -1206,7 +1199,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
1206
1199
})
1207
1200
1208
1201
g .By ("deleting owned RCs when deleted" , func () {
1209
- err = oc .AppsClient ().Apps ().DeploymentConfigs (namespace ).Delete (dcName , & metav1.DeleteOptions {})
1202
+ err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (namespace ).Delete (dcName , & metav1.DeleteOptions {})
1210
1203
o .Expect (err ).NotTo (o .HaveOccurred ())
1211
1204
1212
1205
err = wait .PollImmediate (200 * time .Millisecond , 5 * time .Minute , func () (bool , error ) {
@@ -1286,7 +1279,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
1286
1279
1287
1280
g .By ("redeploying immediately by config change" )
1288
1281
o .Expect (dc .Spec .Template .Annotations ["foo" ]).NotTo (o .Equal ("bar" ))
1289
- dc , err = oc .AppsClient ().Apps ().DeploymentConfigs (dc .Namespace ).Patch (dc .Name , types .StrategicMergePatchType ,
1282
+ dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (dc .Namespace ).Patch (dc .Name , types .StrategicMergePatchType ,
1290
1283
[]byte (`{"spec":{"template":{"metadata":{"annotations":{"foo": "bar"}}}}}` ))
1291
1284
o .Expect (err ).NotTo (o .HaveOccurred ())
1292
1285
dc , err = waitForDCModification (oc , namespace , dcName , deploymentRunTimeout ,
@@ -1386,7 +1379,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
1386
1379
dc .Spec .Replicas = 1
1387
1380
// Make sure the deployer pod doesn't immediately
1388
1381
dc .Spec .MinReadySeconds = 3
1389
- dc , err = oc .AppsClient ().Apps ().DeploymentConfigs (namespace ).Create (dc )
1382
+ dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (namespace ).Create (dc )
1390
1383
o .Expect (err ).NotTo (o .HaveOccurred ())
1391
1384
1392
1385
g .By ("waiting for RC to be created" )
@@ -1431,7 +1424,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
1431
1424
1432
1425
g .By ("redeploying immediately by config change" )
1433
1426
o .Expect (dc .Spec .Template .Annotations ["foo" ]).NotTo (o .Equal ("bar" ))
1434
- dc , err = oc .AppsClient ().Apps ().DeploymentConfigs (dc .Namespace ).Patch (dc .Name , types .StrategicMergePatchType ,
1427
+ dc , err = oc .AppsClient ().AppsV1 ().DeploymentConfigs (dc .Namespace ).Patch (dc .Name , types .StrategicMergePatchType ,
1435
1428
[]byte (`{"spec":{"template":{"metadata":{"annotations":{"foo": "bar"}}}}}` ))
1436
1429
o .Expect (err ).NotTo (o .HaveOccurred ())
1437
1430
dc , err = waitForDCModification (oc , namespace , dcName , deploymentRunTimeout ,
0 commit comments