Skip to content

Commit

Permalink
Fixing more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Sep 26, 2023
1 parent 1b94889 commit 3f30c30
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions testing/integration/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1061,9 +1061,7 @@ func TestStandaloneUpgradeFailsWhenUpgradeIsInProgress(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

upgradeFromVersion, err := version.ParseVersion(twoMinorsPrevious(t, ctx))
require.NoError(t, err)

upgradeFromVersion := twoMinorsPrevious(t, ctx)
upgradeToVersion, err := version.ParseVersion(define.Version())
require.NoError(t, err)

Expand All @@ -1084,7 +1082,6 @@ func TestStandaloneUpgradeFailsWhenUpgradeIsInProgress(t *testing.T) {
t.Log(string(output))
require.NoError(t, err)

c := agentFixture.Client()
require.Eventually(t, func() bool {
return checkAgentHealthAndVersion(t, ctx, agentFixture, upgradeFromVersion.CoreVersion(), upgradeFromVersion.IsSnapshot(), "")
}, 2*time.Minute, 10*time.Second, "Agent never became healthy")
Expand All @@ -1106,7 +1103,7 @@ func TestStandaloneUpgradeFailsWhenUpgradeIsInProgress(t *testing.T) {

// Attempt to upgrade Elastic Agent again, while upgrade is still in progress
t.Logf("Attempting to upgrade Agent again to %s", toVersion)
err := upgradeAgent(ctx, toVersion, agentFixture, t.Log)
err = upgradeAgent(ctx, toVersion, agentFixture, t.Log)
require.Equal(t, "an upgrade is already in progress; please try again later.", err.Error())
}

Expand Down

0 comments on commit 3f30c30

Please sign in to comment.