@@ -400,39 +400,6 @@ func TestDevcontainerCLI_WithOutput(t *testing.T) {
400
400
assert .NotEmpty (t ,outBuf .String (),"stdout buffer should not be empty for exec with log file" )
401
401
assert .Empty (t ,errBuf .String (),"stderr buffer should be empty" )
402
402
})
403
-
404
- t .Run ("ReadConfig" ,func (t * testing.T ) {
405
- t .Parallel ()
406
-
407
- // Buffers to capture stdout and stderr.
408
- outBuf := & bytes.Buffer {}
409
- errBuf := & bytes.Buffer {}
410
-
411
- // Simulate CLI execution with a read-config-success.log file.
412
- wantArgs := "read-configuration --workspace-folder /test/workspace --config /test/config.json"
413
- testExecer := & testDevcontainerExecer {
414
- testExePath :testExePath ,
415
- wantArgs :wantArgs ,
416
- wantError :false ,
417
- logFile :filepath .Join ("testdata" ,"devcontainercli" ,"readconfig" ,"read-config-success.log" ),
418
- }
419
- logger := slogtest .Make (t ,& slogtest.Options {IgnoreErrors :true }).Leveled (slog .LevelDebug )
420
- dccli := agentcontainers .NewDevcontainerCLI (logger ,testExecer )
421
-
422
- // Call ReadConfig with WithReadConfigOutput to capture CLI logs.
423
- ctx := testutil .Context (t ,testutil .WaitMedium )
424
- config ,err := dccli .ReadConfig (ctx ,"/test/workspace" ,"/test/config.json" ,agentcontainers .WithReadConfigOutput (outBuf ,errBuf ))
425
- require .NoError (t ,err ,"ReadConfig should succeed" )
426
- require .NotEmpty (t ,config .Configuration .Customizations ,"expected non-empty customizations" )
427
-
428
- // Read expected log content.
429
- expLog ,err := os .ReadFile (filepath .Join ("testdata" ,"devcontainercli" ,"readconfig" ,"read-config-success.log" ))
430
- require .NoError (t ,err ,"reading expected log file" )
431
-
432
- // Verify stdout buffer contains the CLI logs and stderr is empty.
433
- assert .Equal (t ,string (expLog ),outBuf .String (),"stdout buffer should match CLI logs" )
434
- assert .Empty (t ,errBuf .String (),"stderr buffer should be empty on success" )
435
- })
436
403
}
437
404
438
405
// testDevcontainerExecer implements the agentexec.Execer interface for testing.