Skip to content

Commit

Permalink
Update dependencies, address lint
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Romero <[email protected]>
  • Loading branch information
jromero committed Mar 16, 2020
1 parent 6f5f3f4 commit ffa99e5
Show file tree
Hide file tree
Showing 74 changed files with 2,895 additions and 1,214 deletions.
21 changes: 10 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,36 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/Microsoft/hcsshim v0.8.7 // indirect
github.com/apex/log v1.1.2
github.com/buildpacks/imgutil v0.0.0-20200203165119-4b0611f06e49
github.com/buildpacks/lifecycle v0.6.1
github.com/buildpacks/imgutil v0.0.0-20200313170640-a02052f47d62
github.com/buildpacks/lifecycle v0.7.1
github.com/containerd/containerd v1.3.3 // indirect
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
github.com/dgodd/dockerdial v1.0.1
github.com/docker/cli v0.0.0-20200303162255-7d407207c304 // indirect
github.com/docker/cli v0.0.0-20200312141509-ef2f64abbd37 // indirect
github.com/docker/docker v1.4.2-0.20200221181110-62bd5a33f707
github.com/docker/go-connections v0.4.0
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/mock v1.3.1
github.com/golang/protobuf v1.3.4 // indirect
github.com/golang/protobuf v1.3.5 // indirect
github.com/google/go-cmp v0.3.0
github.com/google/go-containerregistry v0.0.0-20200227193449-ba53fa10e72c
github.com/google/go-containerregistry v0.0.0-20200313165449-955bf358a3d8
github.com/heroku/color v0.0.6
github.com/mattn/go-colorable v0.1.6 // indirect
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e
github.com/onsi/ginkgo v1.11.0 // indirect
github.com/onsi/gomega v1.8.1
github.com/opencontainers/runc v0.1.1 // indirect
github.com/opencontainers/selinux v1.3.3 // indirect
github.com/opencontainers/selinux v1.4.0 // indirect
github.com/pkg/errors v0.9.1
github.com/sclevine/spec v1.4.0
github.com/spf13/cobra v0.0.5
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect
google.golang.org/genproto v0.0.0-20200303153909-beee998c1893 // indirect
google.golang.org/grpc v1.27.1 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
google.golang.org/genproto v0.0.0-20200313141609-30c55424f95d // indirect
google.golang.org/grpc v1.28.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.7 // indirect
gotest.tools/v3 v3.0.2 // indirect
)

Expand Down
78 changes: 39 additions & 39 deletions go.sum

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions inspect_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/Masterminds/semver"
"github.com/buildpacks/lifecycle"
"github.com/buildpacks/lifecycle/launch"
"github.com/pkg/errors"

"github.com/buildpacks/pack/internal/dist"
Expand All @@ -21,8 +22,8 @@ type ImageInfo struct {
}

type ProcessDetails struct {
DefaultProcess *lifecycle.Process
OtherProcesses []lifecycle.Process
DefaultProcess *launch.Process
OtherProcesses []launch.Process
}

// Deserialize just the subset of fields we need to avoid breaking changes
Expand Down
13 changes: 7 additions & 6 deletions inspect_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/buildpacks/imgutil/fakes"
"github.com/buildpacks/lifecycle"
"github.com/buildpacks/lifecycle/launch"
"github.com/golang/mock/gomock"
"github.com/heroku/color"
"github.com/sclevine/spec"
Expand Down Expand Up @@ -178,13 +179,13 @@ func testInspectImage(t *testing.T, when spec.G, it spec.S) {

h.AssertEq(t, info.Processes,
ProcessDetails{
DefaultProcess: &lifecycle.Process{
DefaultProcess: &launch.Process{
Type: "web",
Command: "/start/web-process",
Args: []string{"-p", "1234"},
Direct: false,
},
OtherProcesses: []lifecycle.Process{
OtherProcesses: []launch.Process{
{
Type: "other-process",
Command: "/other/process",
Expand All @@ -207,13 +208,13 @@ func testInspectImage(t *testing.T, when spec.G, it spec.S) {

h.AssertEq(t, info.Processes,
ProcessDetails{
DefaultProcess: &lifecycle.Process{
DefaultProcess: &launch.Process{
Type: "other-process",
Command: "/other/process",
Args: []string{"opt", "1"},
Direct: true,
},
OtherProcesses: []lifecycle.Process{
OtherProcesses: []launch.Process{
{
Type: "web",
Command: "/start/web-process",
Expand All @@ -238,7 +239,7 @@ func testInspectImage(t *testing.T, when spec.G, it spec.S) {
h.AssertEq(t, info.Processes,
ProcessDetails{
DefaultProcess: nil,
OtherProcesses: []lifecycle.Process{
OtherProcesses: []launch.Process{
{
Type: "other-process",
Command: "/other/process",
Expand Down Expand Up @@ -278,7 +279,7 @@ func testInspectImage(t *testing.T, when spec.G, it spec.S) {
h.AssertEq(t, info.Processes,
ProcessDetails{
DefaultProcess: nil,
OtherProcesses: []lifecycle.Process{
OtherProcesses: []launch.Process{
{
Type: "other-process",
Command: "/other/process",
Expand Down
11 changes: 6 additions & 5 deletions internal/buildpackage/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ func testPackageBuilder(t *testing.T, when spec.G, it spec.S) {
return subject.SaveAsFile(path.Join(tmpDir, "package.cnb"))
}},
} {
testFn := test.fn
when(test.name, func() {
when("validate buildpack", func() {
when("buildpack not set", func() {
it("returns error", func() {
err := test.fn()
err := testFn()
h.AssertError(t, err, "buildpack must be set")
})
})
Expand All @@ -100,7 +101,7 @@ func testPackageBuilder(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, err)
subject.AddDependency(bp2)

err = test.fn()
err = testFn()
h.AssertError(t, err, "buildpack '[email protected]' is not used by buildpack '[email protected]'")
})
})
Expand Down Expand Up @@ -132,7 +133,7 @@ func testPackageBuilder(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, err)
subject.AddDependency(presentBP)

err = test.fn()
err = testFn()
h.AssertError(t, err, "buildpack '[email protected]' references buildpack '[email protected]' which is not present")
})
})
Expand Down Expand Up @@ -166,7 +167,7 @@ func testPackageBuilder(t *testing.T, when spec.G, it spec.S) {
h.AssertNil(t, err)
subject.AddDependency(presentBP)

err = test.fn()
err = testFn()
h.AssertError(t, err, "buildpack '[email protected]' references buildpack '[email protected]' which is not present")
})
})
Expand Down Expand Up @@ -207,7 +208,7 @@ func testPackageBuilder(t *testing.T, when spec.G, it spec.S) {

subject.AddDependency(dependency)

err = test.fn()
err = testFn()
h.AssertNil(t, err)
})
})
Expand Down
5 changes: 2 additions & 3 deletions internal/commands/inspect_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import (
"text/tabwriter"
"text/template"

"github.com/buildpacks/lifecycle/launch"
"github.com/pkg/errors"
"github.com/spf13/cobra"

"github.com/buildpacks/lifecycle"

"github.com/buildpacks/pack"
"github.com/buildpacks/pack/internal/config"
"github.com/buildpacks/pack/internal/style"
Expand Down Expand Up @@ -130,7 +129,7 @@ func inspectImageOutput(
return buf.String(), nil
}

func displayProcess(p lifecycle.Process, d bool) process {
func displayProcess(p launch.Process, d bool) process {
shell := ""
if !p.Direct {
shell = "bash"
Expand Down
9 changes: 5 additions & 4 deletions internal/commands/inspect_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"testing"

"github.com/buildpacks/lifecycle"
"github.com/buildpacks/lifecycle/launch"
"github.com/golang/mock/gomock"
"github.com/heroku/color"
"github.com/sclevine/spec"
Expand Down Expand Up @@ -140,13 +141,13 @@ func testInspectImageCommand(t *testing.T, when spec.G, it spec.S) {
Buildpack: lifecycle.Buildpack{ID: "test.bp.one.remote", Version: "1.0.0"},
}},
Processes: pack.ProcessDetails{
DefaultProcess: &lifecycle.Process{
DefaultProcess: &launch.Process{
Type: "some-remote-type",
Command: "/some/remote command",
Args: []string{"some", "remote", "args"},
Direct: false,
},
OtherProcesses: []lifecycle.Process{
OtherProcesses: []launch.Process{
{
Type: "other-remote-type",
Command: "/other/remote/command",
Expand Down Expand Up @@ -186,13 +187,13 @@ func testInspectImageCommand(t *testing.T, when spec.G, it spec.S) {
Buildpack: lifecycle.Buildpack{ID: "test.bp.one.remote", Version: "1.0.0"},
}},
Processes: pack.ProcessDetails{
DefaultProcess: &lifecycle.Process{
DefaultProcess: &launch.Process{
Type: "some-local-type",
Command: "/some/local command",
Args: []string{"some", "local", "args"},
Direct: false,
},
OtherProcesses: []lifecycle.Process{
OtherProcesses: []launch.Process{
{
Type: "other-local-type",
Command: "/other/local/command",
Expand Down
6 changes: 3 additions & 3 deletions testhelpers/tar_assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func AssertOnTarEntry(t *testing.T, tarPath, entryPath string, assertFns ...TarE
}

func AssertOnNestedTar(nestedEntryPath string, assertions ...TarEntryAssertion) TarEntryAssertion {
return func(t *testing.T, header *tar.Header, data []byte) {
return func(t *testing.T, _ *tar.Header, data []byte) {
t.Helper()

header, data, err := readTarFileEntry(bytes.NewReader(data), nestedEntryPath)
Expand All @@ -53,13 +53,13 @@ func readTarFileEntry(reader io.Reader, entryPath string) (*tar.Header, []byte,
gzipReader *gzip.Reader
err error
)

headerBytes, isGzipped, err := isGzipped(reader)
if err != nil {
return nil, nil, errors.Wrap(err, "checking if reader")
}
reader = io.MultiReader(bytes.NewReader(headerBytes), reader)

if isGzipped {
gzipReader, err = gzip.NewReader(reader)
if err != nil {
Expand Down
13 changes: 6 additions & 7 deletions vendor/github.com/buildpacks/imgutil/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ffa99e5

Please sign in to comment.