diff --git a/testing/integration/container_cmd_test.go b/testing/integration/container_cmd_test.go index d3649e529ae..9aaa290705a 100644 --- a/testing/integration/container_cmd_test.go +++ b/testing/integration/container_cmd_test.go @@ -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) @@ -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