Skip to content

Commit

Permalink
fix when fixture.Install logs 'ignoring AGENT_KEEP_INSTALLED...' (#3380)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3372e6f)

# Conflicts:
#	pkg/testing/fixture_install.go
  • Loading branch information
AndersonQ committed Sep 13, 2023
1 parent 0728828 commit fddf1d7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/testing/fixture_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func (f *Fixture) Install(ctx context.Context, installOpts *InstallOpts, opts ..

// environment variable AGENT_KEEP_INSTALLED=true will skip the uninstall
// useful to debug the issue with the Elastic Agent
<<<<<<< HEAD

Check failure on line 131 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / macos

syntax error: unexpected <<, expected }

Check failure on line 131 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / vulncheck (ubuntu-latest)

expected statement, found '<<'

Check failure on line 131 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

expected statement, found '<<' (typecheck)

Check failure on line 131 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / CodeCoverage

syntax error: unexpected <<, expected }
if keepInstalled() {

Check failure on line 132 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / macos

syntax error: unexpected if in argument list; possibly missing comma or )

Check failure on line 132 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / CodeCoverage

syntax error: unexpected if in argument list; possibly missing comma or )
f.t.Logf("skipping uninstall; AGENT_KEEP_INSTALLED=true")
} else {
Expand All @@ -144,6 +145,16 @@ func (f *Fixture) Install(ctx context.Context, installOpts *InstallOpts, opts ..
return
}
require.NoErrorf(f.t, err, "uninstalling agent failed. Output: %q", out)
=======

Check failure on line 148 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / macos

syntax error: unexpected ==, expected }

Check failure on line 148 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / vulncheck (ubuntu-latest)

expected statement, found '=='

Check failure on line 148 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

expected statement, found '==' (typecheck)

Check failure on line 148 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / CodeCoverage

syntax error: unexpected ==, expected }
if f.t.Failed() && keepInstalled() {
f.t.Logf("skipping uninstall; test failed and AGENT_KEEP_INSTALLED=true")
return
}

if keepInstalled() {
f.t.Logf("ignoring AGENT_KEEP_INSTALLED=true as test succeeded, " +
"keeping the agent installed will jeopardise other tests")
>>>>>>> 3372e6f8f1 (fix when fixture.Install logs 'ignoring AGENT_KEEP_INSTALLED...' (#3380))

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / macos

syntax error: unexpected >>, expected }

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / macos

more than one character in rune literal

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / macos

invalid character U+0023 '#'

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / vulncheck (ubuntu-latest)

expected statement, found '>>'

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / vulncheck (ubuntu-latest)

illegal rune literal

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / vulncheck (ubuntu-latest)

illegal character U+0023 '#'

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

expected statement, found '>>' (typecheck)

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / CodeCoverage

syntax error: unexpected >>, expected }

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / CodeCoverage

more than one character in rune literal

Check failure on line 157 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / CodeCoverage

invalid character U+0023 '#'
}
})

Check failure on line 159 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / macos

syntax error: non-declaration statement outside function body

Check failure on line 159 in pkg/testing/fixture_install.go

View workflow job for this annotation

GitHub Actions / CodeCoverage

syntax error: non-declaration statement outside function body

Expand Down

0 comments on commit fddf1d7

Please sign in to comment.