Skip to content

fix(agent/agentcontainers): stop logging empty lines #18605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 26, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: fix test for windows
  • Loading branch information
DanielleMaywood committed Jun 26, 2025
commit f050ad40e78e5a2dbb509719cbd50797d19ef90f
6 changes: 5 additions & 1 deletion agent/agentcontainers/devcontainercli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,12 @@ func TestDevcontainerCLI_WithOutput(t *testing.T) {
expLog, err := os.ReadFile(filepath.Join("testdata", "devcontainercli", "parse", "up.golden"))
require.NoError(t, err, "reading expected log file")

// Convert all CRLF newline endings with LF endings
output := outBuf.String()
output = strings.ReplaceAll(output, "\r\n", "\n")

// Verify stdout buffer contains the CLI logs and stderr is empty.
assert.Equal(t, string(expLog), outBuf.String(), "stdout buffer should match CLI logs")
assert.Equal(t, string(expLog), output, "stdout buffer should match CLI logs")
assert.Empty(t, errBuf.String(), "stderr buffer should be empty on success")
})

Expand Down
Loading