From 616f9480362bbf79fe62fe214d813cca59d60105 Mon Sep 17 00:00:00 2001 From: Paolo Chila Date: Fri, 4 Aug 2023 10:01:10 +0200 Subject: [PATCH] Skip versions newer than version under test for upgrade tests (#3169) 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 --- testing/integration/upgrade_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/integration/upgrade_test.go b/testing/integration/upgrade_test.go index 447b0aeae47..583a117e531 100644 --- a/testing/integration/upgrade_test.go +++ b/testing/integration/upgrade_test.go @@ -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 }