Skip to content

Commit

Permalink
chore: use out.String() instead of string(out.Bytes())
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill committed Aug 31, 2023
1 parent e6746a4 commit e3a66ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func TestConfigureDocker(t *testing.T) {
helper.Stdout = &out
helper.Stderr = os.Stderr
if err = helper.Run(); err != nil {
t.Fatalf("Failed to execute `configure-docker --overwrite`: %v Stdout: %s", err, string(out.Bytes()))
t.Fatalf("Failed to execute `configure-docker --overwrite`: %v Stdout: %s", err, out.String())
}

dockerConfig, err = getDockerConfig()
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestConfigureDocker_NonDefault(t *testing.T) {
helper.Stdout = &out
helper.Stderr = os.Stderr
if err = helper.Run(); err != nil {
t.Fatalf("Failed to execute `configure-docker --overwrite`: %v Stdout: %s", err, string(out.Bytes()))
t.Fatalf("Failed to execute `configure-docker --overwrite`: %v Stdout: %s", err, out.String())
}

dockerConfig, err = getDockerConfig()
Expand Down
2 changes: 1 addition & 1 deletion test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestEndToEnd_GCRCreds(t *testing.T) {
helper.Stdout = &out
helper.Stdin = strings.NewReader(gcrRegistry)
if err = helper.Run(); err != nil {
t.Fatalf("`get` failed: %v, Stdout: %s", err, string(out.Bytes()))
t.Fatalf("`get` failed: %v, Stdout: %s", err, out.String())
}

// Verify the credentials
Expand Down

0 comments on commit e3a66ca

Please sign in to comment.