Skip to content

Commit

Permalink
set STATE_PATH so the upgrade watcher can be launched
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Jan 2, 2024
1 parent edf3901 commit cda693a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testing/integration/container_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ func TestContainerCMD(t *testing.T) {
"FLEET_ENROLL=1",
"FLEET_URL="+fleetURL,
"FLEET_ENROLLMENT_TOKEN="+enrollmentToken.APIKey,
// As the agent isn't built for a container, it's upgradable, triggering
// the start of the upgrade watcher. If `STATE_PATH` isn't set, the
// upgrade watcher will commence from a different path within the
// container, distinct from the current execution path.
"STATE_PATH="+agentFixture.WorkDir(),
)

t.Logf(">> running binary with: %v", cmd.Args)
Expand All @@ -112,7 +117,7 @@ func TestContainerCMD(t *testing.T) {

require.Eventuallyf(t, func() bool {
var healthy bool
// This will returns errors until it connects to the agent,
// This will return errors until it connects to the agent,
// they're mostly noise because until the agent starts running
// we will get connection errors. If the test fails
// the agent logs will be present in the error message
Expand Down

0 comments on commit cda693a

Please sign in to comment.