Skip to content

Commit

Permalink
Add Java Node to new smoke_test layout
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonydahanne committed Sep 25, 2023
1 parent 6c18446 commit e8e4533
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 64 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/test-pull-request-java-node.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func testGradleNodeWithBuilder(builder string) func(*testing.T, spec.G, spec.S)

err = docker.Image.Remove.Execute(image.ID)
if err != nil {
Expect(err).To(MatchError("failed to remove docker image: exit status 1: Error: No such image:"))
Expect(err).To(MatchError(ContainSubstring("failed to remove docker image: exit status 1: Error")))
} else {
Expect(err).ToNot(HaveOccurred())
}
Expand All @@ -90,7 +90,7 @@ func testGradleNodeWithBuilder(builder string) func(*testing.T, spec.G, spec.S)
context("app uses gradle and node", func() {
it("builds successfully", func() {
var err error
source, err = occam.Source(filepath.Join(".", "gradle-node"))
source, err = occam.Source(filepath.Join("../"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package java_node_test

import (
"flag"
"fmt"
"github.com/paketo-buildpacks/samples/tests"
"os"
"path/filepath"
"testing"
Expand All @@ -15,6 +17,11 @@ import (
. "github.com/paketo-buildpacks/occam/matchers"
)

var builders tests.BuilderFlags

func init() {
flag.Var(&builders, "name", "the name a builder to test with")
}
func TestMavenNode(t *testing.T) {
Expect := NewWithT(t).Expect

Expand Down Expand Up @@ -71,7 +78,7 @@ func testMavenNodeWithBuilder(builder string) func(*testing.T, spec.G, spec.S) {

err = docker.Image.Remove.Execute(image.ID)
if err != nil {
Expect(err).To(MatchError("failed to remove docker image: exit status 1: Error: No such image:"))
Expect(err).To(MatchError(ContainSubstring("failed to remove docker image: exit status 1: Error")))
} else {
Expect(err).ToNot(HaveOccurred())
}
Expand All @@ -82,7 +89,7 @@ func testMavenNodeWithBuilder(builder string) func(*testing.T, spec.G, spec.S) {
context("app uses maven and yarn", func() {
it("builds successfully", func() {
var err error
source, err = occam.Source(filepath.Join(".", "maven-yarn"))
source, err = occam.Source(filepath.Join("../"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand Down

0 comments on commit e8e4533

Please sign in to comment.