Skip to content

Commit 4c71a6c

Browse files
committed
fix test
1 parent abdd813 commit 4c71a6c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

agent/agentcontainers/api_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,17 @@ func TestAPI(t *testing.T) {
563563
agentcontainers.WithWatcher(watcher.NewNoop()),
564564
}
565565

566+
// Generate matching scripts for the known devcontainers
567+
// (required to extract log source ID).
568+
var scripts []codersdk.WorkspaceAgentScript
569+
for i := range tt.knownDevcontainers {
570+
scripts = append(scripts, codersdk.WorkspaceAgentScript{
571+
ID: tt.knownDevcontainers[i].ID,
572+
LogSourceID: uuid.New(),
573+
})
574+
}
566575
if len(tt.knownDevcontainers) > 0 {
567-
apiOptions = append(apiOptions, agentcontainers.WithDevcontainers(tt.knownDevcontainers, nil))
576+
apiOptions = append(apiOptions, agentcontainers.WithDevcontainers(tt.knownDevcontainers, scripts))
568577
}
569578

570579
api := agentcontainers.NewAPI(logger, apiOptions...)

0 commit comments

Comments
 (0)