Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf01711a

Browse files
committed
nowindows
1 parent5f1d7fb commitf01711a

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

‎agent/agentcontainers/api_test.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,6 +2074,10 @@ func TestAPI(t *testing.T) {
20742074
t.Run("IgnoreCustomization",func(t*testing.T) {
20752075
t.Parallel()
20762076

2077+
ifruntime.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+
20772081
ctx:=testutil.Context(t,testutil.WaitShort)
20782082

20792083
startTime:=time.Date(2025,1,1,12,0,0,0,time.UTC)
@@ -2188,6 +2192,16 @@ func TestAPI(t *testing.T) {
21882192
err=api.RefreshContainers(ctx)
21892193
require.NoError(t,err)
21902194

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+
21912205
req=httptest.NewRequest(http.MethodGet,"/",nil).WithContext(ctx)
21922206
rec=httptest.NewRecorder()
21932207
r.ServeHTTP(rec,req)
@@ -2199,19 +2213,9 @@ func TestAPI(t *testing.T) {
21992213
assert.Len(t,response.Devcontainers,1,"devcontainer should be in response when ignore=false")
22002214
assert.Len(t,response.Containers,1,"regular container should still be listed")
22012215
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")
22032217
createdAgentID:=fakeSAC.created[0].ID
22042218

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-
22152219
t.Log("Phase 3: Change back to ignore=true and test sub agent deletion")
22162220
fDCCLI.readConfig.Configuration.Customizations.Coder.Ignore=true
22172221
testutil.RequireSend(ctx,t,fakeSAC.deleteErrC,nil)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp