Skip to content

Commit

Permalink
Fixed formatting errors with push.go and push_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
wripley committed Oct 29, 2019
1 parent a065143 commit c8f089f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/executor/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions pkg/executor/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c8f089f

Please sign in to comment.