Skip to content

Commit 67ee0c5

Browse files
committed
fixup! add sub agent as part of autostart integration test
1 parent 1629bee commit 67ee0c5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/workspaceagents_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,8 @@ func TestWorkspaceAgentRecreateDevcontainer(t *testing.T) {
14341434
mccli.EXPECT().List(gomock.Any()).Return(codersdk.WorkspaceAgentListContainersResponse{
14351435
Containers: []codersdk.WorkspaceAgentContainer{devContainer},
14361436
}, nil).AnyTimes()
1437+
// DetectArchitecture always returns "<none>" for this test to disable agent injection.
1438+
mccli.EXPECT().DetectArchitecture(gomock.Any(), devContainer.ID).Return("<none>", nil).AnyTimes()
14371439
mdccli.EXPECT().Up(gomock.Any(), workspaceFolder, configFile, gomock.Any()).Return("someid", nil).Times(1)
14381440
return 0
14391441
},
@@ -1481,7 +1483,7 @@ func TestWorkspaceAgentRecreateDevcontainer(t *testing.T) {
14811483
agentcontainers.WithContainerCLI(mccli),
14821484
agentcontainers.WithDevcontainerCLI(mdccli),
14831485
agentcontainers.WithWatcher(watcher.NewNoop()),
1484-
agentcontainers.WithContainerLabelIncludeFilter("this.label.does.not.exist.ignore.devcontainers", "true"),
1486+
agentcontainers.WithContainerLabelIncludeFilter(agentcontainers.DevcontainerLocalFolderLabel, workspaceFolder),
14851487
)
14861488
})
14871489
resources := coderdtest.NewWorkspaceAgentWaiter(t, client, r.Workspace.ID).Wait()

0 commit comments

Comments
 (0)