Skip to content

Commit dfbfc96

Browse files
fcanovaigbartolini
authored andcommitted
test(e2e): use postgres community image
Explicitly define the images used by the tests, instead of relying on the default operator image. Most tests now use postgres:17-bookworm. Tests requiring barman-cloud on the image use ghcr.io/cloudnative-pg/postgresql:17-bookworm instead. Signed-off-by: Francesco Canovai <[email protected]>
1 parent 4d71b02 commit dfbfc96

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

test/e2e/internal/tests/backup/fixtures.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ func newSrcClusterWithPlugin(namespace string) *cloudnativepgv1.Cluster {
285285
Spec: cloudnativepgv1.ClusterSpec{
286286
Instances: 2,
287287
ImagePullPolicy: corev1.PullAlways,
288+
ImageName: "postgres:17-bookworm",
288289
Plugins: []cloudnativepgv1.PluginConfiguration{
289290
{
290291
Name: "barman-cloud.cloudnative-pg.io",
@@ -298,6 +299,8 @@ func newSrcClusterWithPlugin(namespace string) *cloudnativepgv1.Cluster {
298299
"log_min_messages": "DEBUG4",
299300
},
300301
},
302+
PostgresUID: 999,
303+
PostgresGID: 999,
301304
StorageConfiguration: cloudnativepgv1.StorageConfiguration{
302305
Size: size,
303306
},
@@ -320,6 +323,7 @@ func newDstClusterWithPlugin(namespace string) *cloudnativepgv1.Cluster {
320323
Spec: cloudnativepgv1.ClusterSpec{
321324
Instances: 2,
322325
ImagePullPolicy: corev1.PullAlways,
326+
ImageName: "postgres:17-bookworm",
323327
Bootstrap: &cloudnativepgv1.BootstrapConfiguration{
324328
Recovery: &cloudnativepgv1.BootstrapRecovery{
325329
Source: "source",
@@ -338,6 +342,8 @@ func newDstClusterWithPlugin(namespace string) *cloudnativepgv1.Cluster {
338342
"log_min_messages": "DEBUG4",
339343
},
340344
},
345+
PostgresUID: 999,
346+
PostgresGID: 999,
341347
ExternalClusters: []cloudnativepgv1.ExternalCluster{
342348
{
343349
Name: "source",
@@ -372,6 +378,7 @@ func newSrcClusterInTreeS3(namespace string) *cloudnativepgv1.Cluster {
372378
Spec: cloudnativepgv1.ClusterSpec{
373379
Instances: 2,
374380
ImagePullPolicy: corev1.PullAlways,
381+
ImageName: "ghcr.io/cloudnative-pg/postgresql:17-bookworm",
375382
StorageConfiguration: cloudnativepgv1.StorageConfiguration{
376383
Size: size,
377384
},
@@ -421,6 +428,7 @@ func newDstClusterInTreeS3(namespace string) *cloudnativepgv1.Cluster {
421428
Spec: cloudnativepgv1.ClusterSpec{
422429
Instances: 2,
423430
ImagePullPolicy: corev1.PullAlways,
431+
ImageName: "ghcr.io/cloudnative-pg/postgresql:17-bookworm",
424432
Bootstrap: &cloudnativepgv1.BootstrapConfiguration{
425433
Recovery: &cloudnativepgv1.BootstrapRecovery{
426434
Source: "source",
@@ -486,6 +494,7 @@ func newSrcClusterInTreeAzure(namespace string) *cloudnativepgv1.Cluster {
486494
Spec: cloudnativepgv1.ClusterSpec{
487495
Instances: 2,
488496
ImagePullPolicy: corev1.PullAlways,
497+
ImageName: "ghcr.io/cloudnative-pg/postgresql:17-bookworm",
489498
StorageConfiguration: cloudnativepgv1.StorageConfiguration{
490499
Size: size,
491500
},
@@ -523,6 +532,7 @@ func newDstClusterInTreeAzure(namespace string) *cloudnativepgv1.Cluster {
523532
Spec: cloudnativepgv1.ClusterSpec{
524533
Instances: 2,
525534
ImagePullPolicy: corev1.PullAlways,
535+
ImageName: "ghcr.io/cloudnative-pg/postgresql:17-bookworm",
526536
Bootstrap: &cloudnativepgv1.BootstrapConfiguration{
527537
Recovery: &cloudnativepgv1.BootstrapRecovery{
528538
Source: "source",
@@ -576,6 +586,7 @@ func newSrcClusterInTreeGCS(namespace string) *cloudnativepgv1.Cluster {
576586
Spec: cloudnativepgv1.ClusterSpec{
577587
Instances: 2,
578588
ImagePullPolicy: corev1.PullAlways,
589+
ImageName: "ghcr.io/cloudnative-pg/postgresql:17-bookworm",
579590
StorageConfiguration: cloudnativepgv1.StorageConfiguration{
580591
Size: size,
581592
},
@@ -619,6 +630,7 @@ func newDstClusterInTreeGCS(namespace string) *cloudnativepgv1.Cluster {
619630
Spec: cloudnativepgv1.ClusterSpec{
620631
Instances: 2,
621632
ImagePullPolicy: corev1.PullAlways,
633+
ImageName: "ghcr.io/cloudnative-pg/postgresql:17-bookworm",
622634
Bootstrap: &cloudnativepgv1.BootstrapConfiguration{
623635
Recovery: &cloudnativepgv1.BootstrapRecovery{
624636
Source: "source",

test/e2e/internal/tests/replicacluster/fixtures.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func newSrcCluster(namespace string) *cloudnativepgv1.Cluster {
111111
},
112112
Spec: cloudnativepgv1.ClusterSpec{
113113
Instances: 2,
114+
ImageName: "postgres:17-bookworm",
114115
ImagePullPolicy: corev1.PullAlways,
115116
Plugins: []cloudnativepgv1.PluginConfiguration{
116117
{
@@ -125,6 +126,8 @@ func newSrcCluster(namespace string) *cloudnativepgv1.Cluster {
125126
"log_min_messages": "DEBUG4",
126127
},
127128
},
129+
PostgresUID: 999,
130+
PostgresGID: 999,
128131
StorageConfiguration: cloudnativepgv1.StorageConfiguration{
129132
Size: size,
130133
},
@@ -217,12 +220,15 @@ func newReplicaCluster(namespace string) *cloudnativepgv1.Cluster {
217220
},
218221
Spec: cloudnativepgv1.ClusterSpec{
219222
Instances: 2,
223+
ImageName: "postgres:17-bookworm",
220224
ImagePullPolicy: corev1.PullAlways,
221225
Bootstrap: &cloudnativepgv1.BootstrapConfiguration{
222226
Recovery: &cloudnativepgv1.BootstrapRecovery{
223227
Source: "source",
224228
},
225229
},
230+
PostgresUID: 999,
231+
PostgresGID: 999,
226232
Plugins: []cloudnativepgv1.PluginConfiguration{
227233
{
228234
Name: "barman-cloud.cloudnative-pg.io",

0 commit comments

Comments
 (0)