Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
pbusko committed Dec 13, 2022
1 parent 140218b commit b1d967c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tomcat/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) {

if !versionExists && !shaExists {
v = time.Now().Format(time.RFC3339)
b.Logger.Infof("No BP_TOMCAT_EXT_CONF_VERSION or BP_TOMCAT_EXT_CONF_SHA256 provided, using version '%s'", v)
b.Logger.Infof(color.YellowString("WARNING: No BP_TOMCAT_EXT_CONF_VERSION or BP_TOMCAT_EXT_CONF_SHA256 provided, so no layer caching will occur."))
}

externalConfigurationDependency = &libpak.BuildpackDependency{
Expand Down
12 changes: 3 additions & 9 deletions tomcat/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,9 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
}
ctx.StackID = "test-stack-id"

Expect(os.Setenv("BP_TOMCAT_EXT_CONF_SHA256", "test-sha256")).To(Succeed())
Expect(os.Setenv("BP_TOMCAT_EXT_CONF_URI", "test-uri")).To(Succeed())
Expect(os.Setenv("BP_TOMCAT_EXT_CONF_VERSION", "test-version")).To(Succeed())
})

it.After(func() {
Expect(os.Unsetenv("BP_TOMCAT_EXT_CONF_SHA256")).To(Succeed())
Expect(os.Unsetenv("BP_TOMCAT_EXT_CONF_URI")).To(Succeed())
Expect(os.Unsetenv("BP_TOMCAT_EXT_CONF_VERSION")).To(Succeed())
t.Setenv("BP_TOMCAT_EXT_CONF_SHA256", "test-sha256")
t.Setenv("BP_TOMCAT_EXT_CONF_URI", "test-uri")
t.Setenv("BP_TOMCAT_EXT_CONF_VERSION", "test-version")
})

it("contributes external configuration when $BP_TOMCAT_EXT_CONF_URI, $BP_TOMCAT_EXT_CONF_VERSION and $BP_TOMCAT_EXT_CONF_SHA256 are set", func() {
Expand Down

0 comments on commit b1d967c

Please sign in to comment.