Skip to content

Commit

Permalink
Skip versions newer than version under test for upgrade tests (#3169)
Browse files Browse the repository at this point in the history
This PR filters out versions that too new from agent upgrade integration
tests, allowing backport of those test on release branches.

This PR needs to backported together with #2955 onto 8.9 branch

We want to have working upgrade tests with relevant versions also on
release branches
  • Loading branch information
pchila committed Aug 4, 2023
1 parent 2cc98b8 commit 616f948
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testing/integration/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ func getUpgradableVersions(ctx context.Context, t *testing.T, upgradeToVersion s
break
}

if parsedVersion == parsedUpgradeToVersion {
// skip upgrade to the same version
if !parsedVersion.Less(*parsedUpgradeToVersion) {
// skip upgrade from newer versions than the one under test
t.Logf("Skipping version %q since it's newer or equal to version after upgrade %q", parsedVersion, parsedUpgradeToVersion)
continue
}

Expand Down

0 comments on commit 616f948

Please sign in to comment.