@@ -2074,6 +2074,10 @@ func TestAPI(t *testing.T) {
2074
2074
t .Run ("IgnoreCustomization" ,func (t * testing.T ) {
2075
2075
t .Parallel ()
2076
2076
2077
+ if runtime .GOOS == "windows" {
2078
+ t .Skip ("Dev Container tests are not supported on Windows (this test uses mocks but fails due to Windows paths)" )
2079
+ }
2080
+
2077
2081
ctx := testutil .Context (t ,testutil .WaitShort )
2078
2082
2079
2083
startTime := time .Date (2025 ,1 ,1 ,12 ,0 ,0 ,0 ,time .UTC )
@@ -2188,6 +2192,16 @@ func TestAPI(t *testing.T) {
2188
2192
err = api .RefreshContainers (ctx )
2189
2193
require .NoError (t ,err )
2190
2194
2195
+ t .Log ("Phase 2: Cont, waiting for sub agent to exit" )
2196
+ exitSubAgentOnce .Do (func () {
2197
+ close (exitSubAgent )
2198
+ })
2199
+ select {
2200
+ case <- subAgentExited :
2201
+ case <- ctx .Done ():
2202
+ t .Fatal ("timeout waiting for sub agent to exit" )
2203
+ }
2204
+
2191
2205
req = httptest .NewRequest (http .MethodGet ,"/" ,nil ).WithContext (ctx )
2192
2206
rec = httptest .NewRecorder ()
2193
2207
r .ServeHTTP (rec ,req )
@@ -2199,19 +2213,9 @@ func TestAPI(t *testing.T) {
2199
2213
assert .Len (t ,response .Devcontainers ,1 ,"devcontainer should be in response when ignore=false" )
2200
2214
assert .Len (t ,response .Containers ,1 ,"regular container should still be listed" )
2201
2215
assert .Equal (t ,"/workspace/project" ,response .Devcontainers [0 ].WorkspaceFolder )
2202
- assert .Len (t ,fakeSAC .created ,1 ,"sub agent should be created when ignore=false" )
2216
+ require .Len (t ,fakeSAC .created ,1 ,"sub agent should be created when ignore=false" )
2203
2217
createdAgentID := fakeSAC .created [0 ].ID
2204
2218
2205
- t .Log ("Phase 2: Done, waiting for sub agent to exit" )
2206
- exitSubAgentOnce .Do (func () {
2207
- close (exitSubAgent )
2208
- })
2209
- select {
2210
- case <- subAgentExited :
2211
- case <- ctx .Done ():
2212
- t .Fatal ("timeout waiting for sub agent to exit" )
2213
- }
2214
-
2215
2219
t .Log ("Phase 3: Change back to ignore=true and test sub agent deletion" )
2216
2220
fDCCLI .readConfig .Configuration .Customizations .Coder .Ignore = true
2217
2221
testutil .RequireSend (ctx ,t ,fakeSAC .deleteErrC ,nil )