@@ -2130,7 +2130,7 @@ func TestAgent_DevcontainerAutostart(t *testing.T) {
2130
2130
"name": "mywork",
2131
2131
"image": "ubuntu:latest",
2132
2132
"cmd": ["sleep", "infinity"],
2133
- "runArgs": ["--network=host"]
2133
+ "runArgs": ["--network=host", "--label=` + agentcontainers . DevcontainerIsTestRunLabel + `=true" ]
2134
2134
}` ),0o600 )
2135
2135
require .NoError (t ,err ,"write devcontainer.json" )
2136
2136
@@ -2167,6 +2167,7 @@ func TestAgent_DevcontainerAutostart(t *testing.T) {
2167
2167
// Only match this specific dev container.
2168
2168
agentcontainers .WithClock (mClock ),
2169
2169
agentcontainers .WithContainerLabelIncludeFilter ("devcontainer.local_folder" ,tempWorkspaceFolder ),
2170
+ agentcontainers .WithContainerLabelIncludeFilter (agentcontainers .DevcontainerIsTestRunLabel ,"true" ),
2170
2171
agentcontainers .WithSubAgentURL (srv .URL ),
2171
2172
// The agent will copy "itself", but in the case of this test, the
2172
2173
// agent is actually this test binary. So we'll tell the test binary
@@ -2288,7 +2289,8 @@ func TestAgent_DevcontainerRecreate(t *testing.T) {
2288
2289
err = os .WriteFile (devcontainerFile , []byte (`{
2289
2290
"name": "mywork",
2290
2291
"image": "busybox:latest",
2291
- "cmd": ["sleep", "infinity"]
2292
+ "cmd": ["sleep", "infinity"],
2293
+ "runArgs": ["--label=` + agentcontainers .DevcontainerIsTestRunLabel + `=true"]
2292
2294
}` ),0o600 )
2293
2295
require .NoError (t ,err ,"write devcontainer.json" )
2294
2296
@@ -2315,6 +2317,7 @@ func TestAgent_DevcontainerRecreate(t *testing.T) {
2315
2317
o .Devcontainers = true
2316
2318
o .DevcontainerAPIOptions = append (o .DevcontainerAPIOptions ,
2317
2319
agentcontainers .WithContainerLabelIncludeFilter ("devcontainer.local_folder" ,workspaceFolder ),
2320
+ agentcontainers .WithContainerLabelIncludeFilter (agentcontainers .DevcontainerIsTestRunLabel ,"true" ),
2318
2321
)
2319
2322
})
2320
2323