Skip to content

Commit b08d45a

Browse files
authored
log invalid json (#47546)
### What does this PR do? log invalid json on error ### Motivation https://datadoghq.atlassian.net/browse/WINA-2282 seeing flakes with invalid JSON but can't see the JSON, only the unmarshal error ``` invalid character 'i' in literal false (expecting 'l') ``` https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1468689829/raw Co-authored-by: branden.clark <branden.clark@datadoghq.com>
1 parent f301c25 commit b08d45a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/new-e2e/tests/installer/windows/remote-host-assertions/remote_windows_installer_asserts.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ func (d *RemoteWindowsInstallerAssertions) Status() *RemoteWindowsInstallerStatu
3131
output, err := d.execute("status --json")
3232
d.require.NoError(err)
3333
status, err := parseStatusOutput(output)
34-
d.require.NoError(err)
34+
if err != nil {
35+
d.context.T().Logf("Failed to parse status output: %s", output)
36+
d.require.NoError(err)
37+
}
3538
return &RemoteWindowsInstallerStatusAssertions{
3639
RemoteWindowsInstallerAssertions: d,
3740
status: status,

0 commit comments

Comments
 (0)