From 3f30c30d9ae270e648d635a11e3b6f654be48cc8 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Tue, 26 Sep 2023 03:29:16 -0700 Subject: [PATCH] Fixing more errors --- testing/integration/upgrade_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/testing/integration/upgrade_test.go b/testing/integration/upgrade_test.go index f9a2aa6acdd..f68c2f73afb 100644 --- a/testing/integration/upgrade_test.go +++ b/testing/integration/upgrade_test.go @@ -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) @@ -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") @@ -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()) }