From c8f089fdbbf3445ec2752e00eefc803214487dfa Mon Sep 17 00:00:00 2001 From: Will Ripley Date: Tue, 29 Oct 2019 13:09:27 -0500 Subject: [PATCH] Fixed formatting errors with push.go and push_test.go --- pkg/executor/push.go | 2 +- pkg/executor/push_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/executor/push.go b/pkg/executor/push.go index bfdacaa039..c5ea7c05b3 100644 --- a/pkg/executor/push.go +++ b/pkg/executor/push.go @@ -96,7 +96,7 @@ func CheckPushPermissions(opts *config.KanikoOptions) error { return nil } -func getDigest(image v1.Image) ([]byte, error){ +func getDigest(image v1.Image) ([]byte, error) { digest, err := image.Digest() if err != nil { return nil, err diff --git a/pkg/executor/push_test.go b/pkg/executor/push_test.go index 6bc5dcbef0..838561dde5 100644 --- a/pkg/executor/push_test.go +++ b/pkg/executor/push_test.go @@ -205,19 +205,19 @@ func TestImageNameDigestFile(t *testing.T) { } opts := config.KanikoOptions{ - NoPush: true, - Destinations: []string{"gcr.io/foo/bar:latest", "bob/image"}, - ImageNameDigestFile: "tmpFile", + NoPush: true, + Destinations: []string{"gcr.io/foo/bar:latest", "bob/image"}, + ImageNameDigestFile: "tmpFile", } defer os.Remove("tmpFile") - + if err := DoPush(image, &opts); err != nil { t.Fatalf("could not push image: %s", err) } - want := []byte("gcr.io/foo/bar@" + digest.String() + "\nindex.docker.io/bob/image@" + digest.String() +"\n") - + want := []byte("gcr.io/foo/bar@" + digest.String() + "\nindex.docker.io/bob/image@" + digest.String() + "\n") + got, err := ioutil.ReadFile("tmpFile") testutil.CheckErrorAndDeepEqual(t, false, err, want, got)