Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix acceptance tests
- Update lifecycle to allow use of compatible struct during rebase
- Fix inspect-builder order in tests
- Cleanup package after tests

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
  • Loading branch information
ameyer-pivotal committed Dec 18, 2019
1 parent 3c83f25 commit 60dbdc8
Show file tree
Hide file tree
Showing 15 changed files with 331 additions and 27 deletions.
4 changes: 4 additions & 0 deletions acceptance/acceptance_test.go
Expand Up @@ -1447,6 +1447,10 @@ func createBuilder(t *testing.T, runImageMirror, configDir, packPath, lifecycleP

// CREATE PACKAGE
packageImageName := createPackage(t, configDir, tmpDir, packPath)
key := taskKey("create-package", runImageMirror, configDir, packPath, lifecyclePath)
suiteManager.RegisterCleanUp("clean-"+key, func() error {
return h.DockerRmi(dockerCli, packageImageName)
})

// RENDER builder.toml
cfgData := fillTemplate(t, filepath.Join(configDir, "builder.toml"), map[string]interface{}{
Expand Down
10 changes: 5 additions & 5 deletions acceptance/testdata/pack_previous/builder.toml
@@ -1,8 +1,3 @@
[[buildpacks]]
id = "simple/layers"
version = "simple-layers-version"
uri = "simple-layers-buildpack.tgz"

[[buildpacks]]
id = "read/env"
version = "read-env-version"
Expand All @@ -12,6 +7,11 @@
# intentionally missing id/version as they are optional
uri = "noop-buildpack.tgz"

[[buildpacks]]
id = "simple/layers"
version = "simple-layers-version"
uri = "simple-layers-buildpack.tgz"

[[order]]
[[order.group]]
id = "simple/layers"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -5,7 +5,7 @@ require (
github.com/Masterminds/semver v1.4.2
github.com/apex/log v1.1.2-0.20190827100214-baa5455d1012
github.com/buildpacks/imgutil v0.0.0-20191212154113-dc184e0d403b
github.com/buildpacks/lifecycle v0.5.1-0.20191212164213-3b2b120be460
github.com/buildpacks/lifecycle v0.5.1-0.20191217221752-3b74c943b7b3
github.com/dgodd/dockerdial v1.0.1
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7
github.com/docker/go-connections v0.4.0
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Expand Up @@ -21,8 +21,8 @@ github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
github.com/buildpacks/imgutil v0.0.0-20191212154113-dc184e0d403b h1:SDsB0hJtURA+5i5vIjLntzRNPEqdoz6q+0MShCWdctw=
github.com/buildpacks/imgutil v0.0.0-20191212154113-dc184e0d403b/go.mod h1:E3lXJcNXcRefJQAHW5rqboonet+jtOml4qImbJhYGAo=
github.com/buildpacks/lifecycle v0.5.1-0.20191212164213-3b2b120be460 h1:wwnys/9oBN1XX86SuePWXeOIyh07O4gTFZuD3o+iL/g=
github.com/buildpacks/lifecycle v0.5.1-0.20191212164213-3b2b120be460/go.mod h1:1517xYIXEWiehR7ndWdGCkIlD0KJDLvtVuzZGp7K6Ok=
github.com/buildpacks/lifecycle v0.5.1-0.20191217221752-3b74c943b7b3 h1:15zYyFmNbrtx5MmyVEKVgY2/eearqEqGJXLCjmvUo58=
github.com/buildpacks/lifecycle v0.5.1-0.20191217221752-3b74c943b7b3/go.mod h1:ZIuIs9B6tjAW4dthhltKVyEUlhRfFWWix9eqoInMGX4=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/containerd/containerd v1.3.0 h1:xjvXQWABwS2uiv3TWgQt5Uth60Gu86LTGZXMJkjc7rY=
github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
Expand Down Expand Up @@ -148,8 +148,6 @@ github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/sclevine/spec v1.2.0 h1:1Jwdf9jSfDl9NVmt8ndHqbTZ7XCCPbh1jI3hkDBHVYA=
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
2 changes: 1 addition & 1 deletion rebase.go
Expand Up @@ -30,7 +30,7 @@ func (c *Client) Rebase(ctx context.Context, opts RebaseOptions) error {
return err
}

var md lifecycle.LayersMetadata
var md lifecycle.LayersMetadataCompat
if ok, err := dist.GetLabel(appImage, lifecycle.LayerMetadataLabel, &md); err != nil {
return err
} else if !ok {
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/buildpacks/lifecycle/README.md

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

108 changes: 108 additions & 0 deletions vendor/github.com/buildpacks/lifecycle/archive/tar.go

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

9 changes: 9 additions & 0 deletions vendor/github.com/buildpacks/lifecycle/builder.go

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

0 comments on commit 60dbdc8

Please sign in to comment.