Skip to content

Commit 1f876c2

Browse files
committed
fix(e2e): use correct image name in kustomize overlay
Closes #840 The e2e kustomize overlay matches docker.io/library/plugin-barman-cloud but the base kustomization at kubernetes/kustomization.yaml matches the bare plugin-barman-cloud name from kubernetes/deployment.yaml and replaces it with the GHCR image. Since the overlay name never matches, the locally-built image is never deployed and e2e tests always run against the main branch code from GHCR. Use the bare image name so the overlay rule overrides the base rule. Broken since b7daaac (#89) changed the base kustomization's newName from docker.io/library/plugin-barman-cloud to the GHCR image without updating the e2e overlay. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
1 parent 4642081 commit 1f876c2

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

kubernetes/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ resources:
99
- service.yaml
1010
- ../config/crd
1111
- ../config/rbac
12+
# If you change newName, update the e2e overlay in test/e2e/e2e_suite_test.go too.
1213
images:
1314
- name: plugin-barman-cloud
1415
newName: ghcr.io/cloudnative-pg/plugin-barman-cloud-testing

test/e2e/e2e_suite_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ var _ = SynchronizedBeforeSuite(func(ctx SpecContext) []byte {
5858
const barmanCloudKustomizationPath = "./kustomize/kubernetes/"
5959
barmanCloudKustomization := &kustomizeTypes.Kustomization{
6060
Resources: []string{barmanCloudKustomizationPath},
61+
// Override the image from the base kustomization (kubernetes/kustomization.yaml)
62+
// with the locally-built one. The Name must match the newName in the base.
6163
Images: []kustomizeTypes.Image{
6264
{
63-
Name: "docker.io/library/plugin-barman-cloud",
65+
Name: "ghcr.io/cloudnative-pg/plugin-barman-cloud-testing",
6466
NewName: "registry.barman-cloud-plugin:5000/plugin-barman-cloud",
6567
NewTag: "testing",
6668
},

0 commit comments

Comments
 (0)