Skip to content

Commit

Permalink
Add Java native 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 47c387e commit 6c18446
Show file tree
Hide file tree
Showing 49 changed files with 29 additions and 69 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/test-pull-request-java-native-image.yml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package java_test
package native_image_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 TestJNIPublicStaticMain(t *testing.T) {
Expect := NewWithT(t).Expect

Expand Down Expand Up @@ -69,7 +76,7 @@ func testPublicStaticMainWithBuilder(builder string) func(*testing.T, spec.G, sp
context("app uses simple JAR", func() {
it("builds successfully", func() {
var err error
source, err = occam.Source(filepath.Join(".", "public-static-main"))
source, err = occam.Source(filepath.Join("../"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package java_test
package native_image_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 TestJNIQuarkus(t *testing.T) {
Expect := NewWithT(t).Expect

Expand Down Expand Up @@ -69,7 +76,7 @@ func testQuarkusWithBuilder(builder string) func(*testing.T, spec.G, spec.S) {
context("uses simple Quarkus app", func() {
it("builds successfully", func() {
var err error
source, err = occam.Source(filepath.Join(".", "quarkus-native"))
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,4 +1,4 @@
package java_test
package native_image_test

import (
"flag"
Expand Down Expand Up @@ -77,7 +77,7 @@ func testGradleWithBuilder(builder string) func(*testing.T, spec.G, spec.S) {
context("uses Gradle based Spring Boot app", func() {
it("builds successfully", func() {
var err error
source, err = occam.Source(filepath.Join(".", "java-native-image-sample-gradle"))
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_test
package native_image_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 TestJNIMaven(t *testing.T) {
Expect := NewWithT(t).Expect

Expand Down Expand Up @@ -69,7 +76,7 @@ func testMavenWithBuilder(builder string) func(*testing.T, spec.G, spec.S) {
context("uses Spring Boot app Maven", func() {
it("builds successfully", func() {
var err error
source, err = occam.Source(filepath.Join(".", "java-native-image-sample"))
source, err = occam.Source(filepath.Join("../"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand Down

0 comments on commit 6c18446

Please sign in to comment.