Skip to content

Commit

Permalink
fix: pg upgrade check test
Browse files Browse the repository at this point in the history
Don't test against the latest version, it may not be supported yet by the operator
  • Loading branch information
rriski committed Sep 5, 2024
1 parent 87eb834 commit a30ea13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/postgresql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ spec:
tags:
env: prod
instance: pg
userConfig:
pg_version: "14"
`, project, pgName, cloudName)
Expand Down Expand Up @@ -277,8 +277,10 @@ func TestPgUpgradeVersion(t *testing.T) {
defer recoverPanic(t)

pgVersions := service.TargetVersionTypeChoices()
startingVersion := pgVersions[len(pgVersions)-2]
targetVersion := pgVersions[len(pgVersions)-1]
// The latest reported version from the upgrade check task may not be available in the operator yet.
// Therefore, we set targetVersion to the second to last version.
startingVersion := pgVersions[len(pgVersions)-3] // third to last
targetVersion := pgVersions[len(pgVersions)-2] // second to last

ctx, cancel := testCtx()
defer cancel()
Expand Down

0 comments on commit a30ea13

Please sign in to comment.