Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: integration tests, node home validation should be empty string #82

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ func TestIntegration(t *testing.T) {
SetDefaultEventuallyTimeout(5 * time.Second)

suite := spec.New("Integration", spec.Report(report.Terminal{}), spec.Parallel())
suite("OpenSSL", testOpenSSL)
suite("OptimizeMemory", testOptimizeMemory)
suite("ProjectPath", testProjectPath)
suite("Provides", testProvides)
suite("Simple", testSimple)
suite("OpenSSL", testOpenSSL)
suite.Run(t)
}
5 changes: 2 additions & 3 deletions integration/openssl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"testing"

"github.com/paketo-buildpacks/occam"
Expand Down Expand Up @@ -87,7 +86,7 @@ func testOpenSSL(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))
Expand Down Expand Up @@ -129,7 +128,7 @@ func testOpenSSL(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))
Expand Down
3 changes: 1 addition & 2 deletions integration/optimize_memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"testing"

"github.com/paketo-buildpacks/occam"
Expand Down Expand Up @@ -77,7 +76,7 @@ func testOptimizeMemory(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
`[extender (build)] OPTIMIZE_MEMORY -> "true"`,
Expand Down
4 changes: 2 additions & 2 deletions integration/provides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ func testProvides(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
"[extender (build)] Configuring build environment",
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))

Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))
Expand Down
16 changes: 8 additions & 8 deletions integration/simple_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ func testSimple(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
"[extender (build)] Configuring build environment",
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))

Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))
Expand Down Expand Up @@ -176,15 +176,15 @@ func testSimple(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
"[extender (build)] Configuring build environment",
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))

Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))
Expand Down Expand Up @@ -270,15 +270,15 @@ func testSimple(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
"[extender (build)] Configuring build environment",
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))

Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))
Expand Down Expand Up @@ -361,15 +361,15 @@ func testSimple(t *testing.T, context spec.G, it spec.S) {
Expect(logs).To(ContainLines(
"[extender (build)] Configuring build environment",
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))

Expect(logs).To(ContainLines(
`[extender (build)] Configuring launch environment`,
`[extender (build)] NODE_ENV -> "production"`,
fmt.Sprintf(`[extender (build)] NODE_HOME -> "/layers/%s/node"`, strings.ReplaceAll(settings.Buildpack.ID, "/", "_")),
`[extender (build)] NODE_HOME -> ""`,
`[extender (build)] NODE_OPTIONS -> "--use-openssl-ca"`,
`[extender (build)] NODE_VERBOSE -> "false"`,
))
Expand Down
Loading