@@ -41,6 +41,7 @@ var _ = g.Describe("deploymentconfigs", func() {
41
41
tagImagesFixture = exutil .FixturePath ("testdata" , "deployments" , "tag-images-deployment.yaml" )
42
42
readinessFixture = exutil .FixturePath ("testdata" , "deployments" , "readiness-test.yaml" )
43
43
envRefDeploymentFixture = exutil .FixturePath ("testdata" , "deployments" , "deployment-with-ref-env.yaml" )
44
+ ignoresDeployersFixture = exutil .FixturePath ("testdata" , "deployments" , "deployment-ignores-deployer.yaml" )
44
45
)
45
46
46
47
g .Describe ("when run iteratively [Conformance]" , func () {
@@ -302,6 +303,7 @@ var _ = g.Describe("deploymentconfigs", func() {
302
303
o .Expect (out ).To (o .ContainSubstring ("hello bar" ))
303
304
})
304
305
})
306
+
305
307
g .Describe ("with multiple image change triggers [Conformance]" , func () {
306
308
g .AfterEach (func () {
307
309
failureTrap (oc , "example" , g .CurrentGinkgoTestDescription ().Failed )
@@ -782,4 +784,44 @@ var _ = g.Describe("deploymentconfigs", func() {
782
784
o .Expect (waitForLatestCondition (oc , name , deploymentRunTimeout , deploymentRunning )).NotTo (o .HaveOccurred ())
783
785
})
784
786
})
787
+
788
+ g .Describe ("ignores deployer and lets the config with a NewReplicationControllerCreated reason [Conformance]" , func () {
789
+ g .AfterEach (func () {
790
+ failureTrap (oc , "database" , g .CurrentGinkgoTestDescription ().Failed )
791
+ })
792
+
793
+ g .It ("should let the deployment config with a NewReplicationControllerCreated reason" , func () {
794
+ _ , name , err := createFixture (oc , ignoresDeployersFixture )
795
+ o .Expect (err ).NotTo (o .HaveOccurred ())
796
+
797
+ g .By ("verifying that the deployment config is bumped to the first version" )
798
+ err = wait .PollImmediate (500 * time .Millisecond , 30 * time .Second , func () (bool , error ) {
799
+ dc , _ , _ , err := deploymentInfo (oc , name )
800
+ if err != nil {
801
+ return false , nil
802
+ }
803
+ return dc .Status .LatestVersion == 1 , nil
804
+ })
805
+ if err == wait .ErrWaitTimeout {
806
+ err = fmt .Errorf ("deployment config %q never incremented to the first version" , name )
807
+ }
808
+ o .Expect (err ).NotTo (o .HaveOccurred ())
809
+
810
+ g .By ("verifying that the deployment config has the desired condition and reason" )
811
+ var conditions []deployapi.DeploymentCondition
812
+ err = wait .PollImmediate (500 * time .Millisecond , 30 * time .Second , func () (bool , error ) {
813
+ dc , _ , _ , err := deploymentInfo (oc , name )
814
+ if err != nil {
815
+ return false , nil
816
+ }
817
+ conditions = dc .Status .Conditions
818
+ cond := deployutil .GetDeploymentCondition (dc .Status , deployapi .DeploymentProgressing )
819
+ return cond != nil && cond .Reason == deployutil .NewReplicationControllerReason , nil
820
+ })
821
+ if err == wait .ErrWaitTimeout {
822
+ err = fmt .Errorf ("deployment config %q never updated its conditions: %#v" , name , conditions )
823
+ }
824
+ o .Expect (err ).NotTo (o .HaveOccurred ())
825
+ })
826
+ })
785
827
})
0 commit comments