Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Busko <pavel.busko@sap.com>
  • Loading branch information
pbusko committed Apr 30, 2024
1 parent 6caf66e commit 55221fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions phase/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) {
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=ubuntu")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=22.04")
return buildpack.BuildOutputs{}, nil
},
)
Expand All @@ -205,8 +205,8 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) {
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=ubuntu")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=22.04")
return buildpack.BuildOutputs{}, nil
})

Expand Down
4 changes: 2 additions & 2 deletions phase/detector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ func testDetector(t *testing.T, when spec.G, it spec.S) {
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH=amd64")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_ARCH_VARIANT=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_OS=linux")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_NAME=ubuntu")
h.AssertContains(t, inputs.TargetEnv, "CNB_TARGET_DISTRO_VERSION=22.04")
return buildpack.DetectOutputs{}
})

Expand Down
8 changes: 4 additions & 4 deletions phase/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) {
h.AssertContains(t, inputs.TargetEnv,
"CNB_TARGET_ARCH=amd64",
"CNB_TARGET_ARCH_VARIANT=",
"CNB_TARGET_DISTRO_NAME=",
"CNB_TARGET_DISTRO_VERSION=",
"CNB_TARGET_DISTRO_NAME=ubuntu",
"CNB_TARGET_DISTRO_VERSION=22.04",
"CNB_TARGET_OS=linux",
)
return buildpack.GenerateOutputs{Dockerfiles: []buildpack.DockerfileInfo{{ExtensionID: d.Extension.ID,
Expand All @@ -296,8 +296,8 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) {
h.AssertContains(t, inputs.TargetEnv,
"CNB_TARGET_ARCH=amd64",
"CNB_TARGET_ARCH_VARIANT=",
"CNB_TARGET_DISTRO_NAME=",
"CNB_TARGET_DISTRO_VERSION=",
"CNB_TARGET_DISTRO_NAME=ubuntu",
"CNB_TARGET_DISTRO_VERSION=22.04",
"CNB_TARGET_OS=linux",
)
return buildpack.GenerateOutputs{Dockerfiles: []buildpack.DockerfileInfo{{ExtensionID: d.Extension.ID,
Expand Down

0 comments on commit 55221fd

Please sign in to comment.