Skip to content

Commit 3af7eb2

Browse files
test(img): correct test to assert pull policy on db and storage containers (#905) (#906)
(cherry picked from commit b3ec388) Co-authored-by: Andrew Azores <aazores@redhat.com>
1 parent c80a237 commit 3af7eb2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/controllers/reconciler_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,12 +1037,16 @@ func (c *controllerTest) commonTests() {
10371037
reportsImg := "my/reports-image:latest"
10381038
oauth2ProxyImg := "my/authproxy-image:latest"
10391039
openshiftAuthProxyImg := "my/openshift-authproxy-image:latest"
1040+
dbImg := "my/db-image:latest"
1041+
storageImg := "my/storage-image:latest"
10401042
t.EnvCoreImageTag = &coreImg
10411043
t.EnvDatasourceImageTag = &datasourceImg
10421044
t.EnvGrafanaImageTag = &grafanaImg
10431045
t.EnvReportsImageTag = &reportsImg
10441046
t.EnvOAuth2ProxyImageTag = &oauth2ProxyImg
10451047
t.EnvOpenShiftOAuthProxyImageTag = &openshiftAuthProxyImg
1048+
t.EnvDatabaseImageTag = &dbImg
1049+
t.EnvStorageImageTag = &storageImg
10461050
})
10471051
It("should create deployment with the expected tags", func() {
10481052
t.expectMainDeployment()
@@ -1052,7 +1056,7 @@ func (c *controllerTest) commonTests() {
10521056
containers := mainDeploy.Spec.Template.Spec.Containers
10531057
Expect(containers).To(HaveLen(6))
10541058
for _, container := range containers {
1055-
Expect(container.ImagePullPolicy).To(Equal(corev1.PullAlways))
1059+
Expect(container.ImagePullPolicy).To(Equal(corev1.PullAlways), "Container %s", container.Image)
10561060
}
10571061
reportContainers := reportsDeploy.Spec.Template.Spec.Containers
10581062
Expect(reportContainers).To(HaveLen(1))

0 commit comments

Comments
 (0)