Skip to content

Commit

Permalink
Print out why we couldn't parse show output in the test helper
Browse files Browse the repository at this point in the history
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
  • Loading branch information
carolynvs committed Apr 26, 2023
1 parent c222a70 commit 1ab0221
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/tester/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ func (t Tester) ShowInstallation(namespace string, name string) (porter.DisplayI

var di porter.DisplayInstallation

require.NoError(t.T, json.Unmarshal([]byte(stdout), &di))
err = json.Unmarshal([]byte(stdout), &di)
if err != nil {
t.T.Fatalf("porter show returned non-json output to stdout: %s", stdout)
}

return di, nil
}
Expand Down

0 comments on commit 1ab0221

Please sign in to comment.