You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("failed to handle reconcile annotation: unable to change phase of provider %s/%s to progressing: %w", provider.GetNamespace(), provider.GetName(), err)
Expect(job.Spec.Template.Spec.Containers[0].Image).To(Equal("test-image:v0.1.0"), "Job container image should match the provider spec")
64
+
Expect(job.Spec.Template.Spec.Containers[0].Args).To(ContainElement("init"), "Job container args should contain the init command")
65
+
Expect(job.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--environment=test-environment"), "Job container args should contain the environment")
66
+
Expect(job.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--verbosity=DEBUG"), "Job container args should contain the verbosity")
67
+
Expect(job.Spec.Template.Spec.Containers[0].Env).To(HaveLen(1), "Job container should have an environment variables")
68
+
Expect(job.Spec.Template.Spec.Containers[0].Env[0].Name).To(Equal("NAME"), "Job container environment variable name should match the provider spec")
69
+
Expect(job.Spec.Template.Spec.Containers[0].Env[0].Value).To(Equal("test-name"), "Job container environment variable value should match the provider spec")
70
+
71
+
// 2nd reconcile (after init job is completed)
72
+
job.Status.Succeeded=1
73
+
Expect(env.Client().Status().Update(env.Ctx, job)).To(Succeed(), "Status update of init job should succeed")
74
+
env.ShouldReconcile(req, "2nd reconcile should not return an error")
Expect(deploy.Spec.Template.Spec.Containers[0].Image).To(Equal("test-image:v0.1.0"), "Deployment container image should match the provider spec")
82
+
Expect(deploy.Spec.Template.Spec.Containers[0].Args).To(ContainElement("run"), "Deployment container args should contain the run command")
83
+
Expect(deploy.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--environment=test-environment"), "Deployment container args should contain the environment")
84
+
Expect(deploy.Spec.Template.Spec.Containers[0].Args).To(ContainElement("--verbosity=DEBUG"), "Deployment container args should contain the verbosity")
85
+
Expect(deploy.Spec.Template.Spec.Containers[0].Env).To(HaveLen(1), "Deployment container should have an environment variables")
86
+
Expect(deploy.Spec.Template.Spec.Containers[0].Env[0].Name).To(Equal("NAME"), "Deployment container environment variable name should match the provider spec")
87
+
Expect(deploy.Spec.Template.Spec.Containers[0].Env[0].Value).To(Equal("test-name"), "Deployment container environment variable value should match the provider spec")
88
+
89
+
// 3rd reconcile (after deployment is ready)
90
+
deploy.Status.Replicas=1
91
+
deploy.Status.UpdatedReplicas=1
92
+
deploy.Status.AvailableReplicas=1
93
+
Expect(env.Client().Status().Update(env.Ctx, deploy)).To(Succeed(), "Status update of deployment should succeed")
94
+
env.ShouldReconcile(req, "3rd reconcile should not return an error")
0 commit comments