Skip to content

Commit

Permalink
fix(tests): fix flaky tests from updates
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed May 19, 2024
1 parent d1e75b0 commit 1de2444
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ release:
tests:
- it: should generate correct spec with recovery/backup
set:
postgres16Image:
repository: ghcr.io/cloudnative-pg/postgresql
tag: "16.3"
pullPolicy: IfNotPresent
cnpg:
my-pg:
enabled: true
Expand All @@ -33,7 +37,7 @@ tests:
path: spec
value:
enableSuperuserAccess: true
imageName: ghcr.io/cloudnative-pg/postgresql:16.2
imageName: ghcr.io/cloudnative-pg/postgresql:16.3
primaryUpdateStrategy: unsupervised
primaryUpdateMethod: switchover
logLevel: info
Expand Down
6 changes: 5 additions & 1 deletion library/common-test/tests/cnpg/cluster_spec_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ release:
tests:
- it: should generate correct spec
set:
postgres16Image:
repository: ghcr.io/cloudnative-pg/postgresql
tag: "16.3"
pullPolicy: IfNotPresent
cnpg:
my-pg:
enabled: true
Expand All @@ -29,7 +33,7 @@ tests:
path: spec
value:
enableSuperuserAccess: true
imageName: ghcr.io/cloudnative-pg/postgresql:16.2
imageName: ghcr.io/cloudnative-pg/postgresql:16.3
primaryUpdateStrategy: unsupervised
primaryUpdateMethod: switchover
logLevel: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ tests:
- documentIndex: *secretDoc
isAPIVersion:
of: v1
- documentIndex: *secretDoc
equal:
path: metadata.name
value: test-release-name-common-test-destbackup-volsync-mybackup1
- documentIndex: *secretDoc
equal:
path: stringData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ apiVersion: volsync.backube/v1alpha1
kind: ReplicationDestination
metadata:
name: {{ printf "%s-%s-dest" $objectData.name $volsyncData.name }}
namespace: {{ include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $rootCtx "objectData" $objectData "caller" "replicationdestination") }}
namespace: {{ include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $rootCtx "objectData" $objectData "caller" "Replication Destination") }}
{{- $labels := (mustMerge ($volsyncData.labels | default dict) (include "tc.v1.common.lib.metadata.allLabels" $rootCtx | fromYaml)) -}}
{{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $rootCtx "labels" $labels) | trim) }}
labels:
Expand Down

0 comments on commit 1de2444

Please sign in to comment.