Skip to content

Commit 757dc85

Browse files
committed
fixup! fixup! add sub agent env and revert container id change
1 parent 67ee0c5 commit 757dc85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

agent/agentcontainers/devcontainercli_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func TestDevcontainerCLI_ArgsAndParsing(t *testing.T) {
183183
cmd: "echo",
184184
cmdArgs: []string{"hello"},
185185
opts: []agentcontainers.DevcontainerCLIExecOptions{agentcontainers.WithExecContainerID("test-container-123")},
186-
wantArgs: "exec --container-id test-container-123 echo hello",
186+
wantArgs: "exec --workspace-folder /test/workspace --container-id test-container-123 echo hello",
187187
wantError: false,
188188
},
189189
{
@@ -193,7 +193,7 @@ func TestDevcontainerCLI_ArgsAndParsing(t *testing.T) {
193193
cmd: "bash",
194194
cmdArgs: []string{"-c", "ls -la"},
195195
opts: []agentcontainers.DevcontainerCLIExecOptions{agentcontainers.WithExecContainerID("my-container")},
196-
wantArgs: "exec --container-id my-container --config /test/config.json bash -c ls -la",
196+
wantArgs: "exec --workspace-folder /test/workspace --config /test/config.json --container-id my-container bash -c ls -la",
197197
wantError: false,
198198
},
199199
{
@@ -205,7 +205,7 @@ func TestDevcontainerCLI_ArgsAndParsing(t *testing.T) {
205205
opts: []agentcontainers.DevcontainerCLIExecOptions{
206206
agentcontainers.WithExecContainerID("test-container-789"),
207207
},
208-
wantArgs: "exec --container-id test-container-789 cat /etc/hostname",
208+
wantArgs: "exec --workspace-folder /test/workspace --container-id test-container-789 cat /etc/hostname",
209209
wantError: false,
210210
},
211211
}
@@ -293,7 +293,7 @@ func TestDevcontainerCLI_WithOutput(t *testing.T) {
293293
errBuf := &bytes.Buffer{}
294294

295295
// Simulate CLI execution for exec command with container ID.
296-
wantArgs := "exec --container-id test-container-456 echo hello"
296+
wantArgs := "exec --workspace-folder /test/workspace --container-id test-container-456 echo hello"
297297
testExecer := &testDevcontainerExecer{
298298
testExePath: testExePath,
299299
wantArgs: wantArgs,

0 commit comments

Comments
 (0)