Skip to content

Commit

Permalink
Bump to libcnb 1.25.1
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
  • Loading branch information
Daniel Mikusa committed Nov 29, 2021
1 parent 812ec63 commit c963cf1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.15
require (
github.com/CycloneDX/cyclonedx-go v0.4.0
github.com/Masterminds/semver/v3 v3.1.1
github.com/buildpacks/libcnb v1.25.0
github.com/buildpacks/libcnb v1.25.1
github.com/creack/pty v1.1.17
github.com/heroku/color v0.0.6
github.com/imdario/mergo v0.3.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/bradleyjkemp/cupaloy/v2 v2.6.0 h1:knToPYa2xtfg42U3I6punFEjaGFKWQRXJwj0JTv4mTs=
github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0=
github.com/buildpacks/libcnb v1.25.0 h1:f0UWYUbXQ/vTX6SztGn+sP/F6cVSAbBQO4B5/R1LEP8=
github.com/buildpacks/libcnb v1.25.0/go.mod h1:XX0+zHW8CNLNwiiwowgydAgWWfyDt8Lj1NcuWtkkBJQ=
github.com/buildpacks/libcnb v1.25.1 h1:fIMkksmGQHzRuqbxRst/Z3y6L8/6PJWT7H1jIVEpkqQ=
github.com/buildpacks/libcnb v1.25.1/go.mod h1:XX0+zHW8CNLNwiiwowgydAgWWfyDt8Lj1NcuWtkkBJQ=
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
60 changes: 32 additions & 28 deletions layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,13 +625,14 @@ func testLayer(t *testing.T, context spec.G, it spec.S) {

it("does not call function with matching metadata", func() {
layer.Metadata = map[string]interface{}{
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"keywords": []interface{}{},
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"sbom-formats": []interface{}{},
"keywords": []interface{}{},
}

_, err := hlc.Contribute(layer)
Expand All @@ -646,25 +647,27 @@ func testLayer(t *testing.T, context spec.G, it spec.S) {
Expect(err).NotTo(HaveOccurred())

Expect(layer.Metadata).To(Equal(map[string]interface{}{
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"keywords": []interface{}{},
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"sbom-formats": []interface{}{},
"keywords": []interface{}{},
}))
})

it("sets layer flags regardless of caching behavior (required for 0.6 API)", func() {
layer.Metadata = map[string]interface{}{
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"keywords": []interface{}{},
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"sbom-formats": []interface{}{},
"keywords": []interface{}{},
}
// Launch is the only one set & always true

Expand All @@ -681,13 +684,14 @@ func testLayer(t *testing.T, context spec.G, it spec.S) {

it("adds expected Syft SBOM file", func() {
layer.Metadata = map[string]interface{}{
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"keywords": []interface{}{},
"id": buildpack.Info.ID,
"name": buildpack.Info.Name,
"version": buildpack.Info.Version,
"homepage": buildpack.Info.Homepage,
"clear-env": buildpack.Info.ClearEnvironment,
"description": "",
"sbom-formats": []interface{}{},
"keywords": []interface{}{},
}

_, err := hlc.Contribute(layer)
Expand Down

0 comments on commit c963cf1

Please sign in to comment.