Skip to content

Commit

Permalink
Fix expected versions in checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Sep 27, 2023
1 parent 4806f6a commit 96dca69
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions testing/integration/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ func TestStandaloneUpgradeFailsRestart(t *testing.T) {

// Ensure new (post-upgrade) version is running and Agent is healthy
require.Eventually(t, func() bool {
return checkAgentHealthAndVersion(t, ctx, fromF, toVersion, false, "")
return checkAgentHealthAndVersion(t, ctx, fromF, toVersionParsed.CoreVersion(), toVersionParsed.IsSnapshot(), "")
}, 2*time.Minute, 10*time.Second, "Installed Agent never became healthy")

// A few seconds after the upgrade, deliberately restart upgraded Agent a
Expand All @@ -1151,13 +1151,11 @@ func TestStandaloneUpgradeFailsRestart(t *testing.T) {
}

// Ensure that the Upgrade Watcher has stopped running.
parsedFromVersion, err := version.ParseVersion(fromVersion)
require.NoError(t, err)
waitForUpgradeWatcherToComplete(t, fromF, parsedFromVersion, standaloneWatcherDuration)
waitForUpgradeWatcherToComplete(t, fromF, fromVersionParsed, standaloneWatcherDuration)

// Ensure that the original version of Agent is running again.
t.Log("Check Agent version to ensure rollback is successful")
require.Eventually(t, func() bool {
return checkAgentHealthAndVersion(t, ctx, fromF, fromVersion, false, "")
return checkAgentHealthAndVersion(t, ctx, fromF, fromVersionParsed.CoreVersion(), false, "")
}, 2*time.Minute, 10*time.Second, "Installed Agent never became healthy")
}

0 comments on commit 96dca69

Please sign in to comment.