@@ -2130,7 +2130,7 @@ func TestAgent_DevcontainerAutostart(t *testing.T) {
21302130"name": "mywork",
21312131"image": "ubuntu:latest",
21322132"cmd": ["sleep", "infinity"],
2133- "runArgs": ["--network=host"]
2133+ "runArgs": ["--network=host", "--label=` + agentcontainers . DevcontainerIsTestRunLabel + `=true" ]
21342134 }` ),0o600 )
21352135require .NoError (t ,err ,"write devcontainer.json" )
21362136
@@ -2167,6 +2167,7 @@ func TestAgent_DevcontainerAutostart(t *testing.T) {
21672167// Only match this specific dev container.
21682168agentcontainers .WithClock (mClock ),
21692169agentcontainers .WithContainerLabelIncludeFilter ("devcontainer.local_folder" ,tempWorkspaceFolder ),
2170+ agentcontainers .WithContainerLabelIncludeFilter (agentcontainers .DevcontainerIsTestRunLabel ,"true" ),
21702171agentcontainers .WithSubAgentURL (srv .URL ),
21712172// The agent will copy "itself", but in the case of this test, the
21722173// agent is actually this test binary. So we'll tell the test binary
@@ -2288,7 +2289,8 @@ func TestAgent_DevcontainerRecreate(t *testing.T) {
22882289err = os .WriteFile (devcontainerFile , []byte (`{
22892290 "name": "mywork",
22902291 "image": "busybox:latest",
2291- "cmd": ["sleep", "infinity"]
2292+ "cmd": ["sleep", "infinity"],
2293+ "runArgs": ["--label=` + agentcontainers .DevcontainerIsTestRunLabel + `=true"]
22922294 }` ),0o600 )
22932295require .NoError (t ,err ,"write devcontainer.json" )
22942296
@@ -2315,6 +2317,7 @@ func TestAgent_DevcontainerRecreate(t *testing.T) {
23152317o .Devcontainers = true
23162318o .DevcontainerAPIOptions = append (o .DevcontainerAPIOptions ,
23172319agentcontainers .WithContainerLabelIncludeFilter ("devcontainer.local_folder" ,workspaceFolder ),
2320+ agentcontainers .WithContainerLabelIncludeFilter (agentcontainers .DevcontainerIsTestRunLabel ,"true" ),
23182321)
23192322})
23202323