Skip to content

Commit

Permalink
test with akka
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonydahanne committed Sep 21, 2023
1 parent 3995d1f commit 9831969
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test-pull-request-java-akka.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test Pull Request (Akka)

on:
merge_group:
pull_request:
branches:
- main
paths:
- java/akka/**

jobs:
smoke:
name: Smoke Tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x

- name: Checkout
uses: actions/checkout@v4

- name: Test Java Samples
run: |
./scripts/smoke.sh --suite java/akka/smoke_test \
--builder paketobuildpacks/builder:full \
--builder paketobuildpacks/builder:base \
--builder paketobuildpacks/builder:tiny
14 changes: 11 additions & 3 deletions java/akka_test.go → java/akka/smoke_test/akka_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package java_test
package akka_test

import (
"flag"
"fmt"
"github.com/paketo-buildpacks/samples/tests"
"os"
"path/filepath"
"strings"
Expand All @@ -16,6 +18,12 @@ 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 TestAkka(t *testing.T) {
Expect := NewWithT(t).Expect

Expand Down Expand Up @@ -73,7 +81,7 @@ func testAkkaWithBuilder(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.Error()).To(ContainSubstring("failed to remove docker image: exit status 1: Error"))
} else {
Expect(err).ToNot(HaveOccurred())
}
Expand All @@ -88,7 +96,7 @@ func testAkkaWithBuilder(builder string) func(*testing.T, spec.G, spec.S) {
}

var err error
source, err = occam.Source(filepath.Join("../java", "akka"))
source, err = occam.Source(filepath.Join("../../", "akka"))
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 application_insights_test

import (
"flag"
"fmt"
"github.com/paketo-buildpacks/samples/tests"
"os"
"path/filepath"
"testing"
Expand All @@ -15,6 +17,12 @@ 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 TestApplicationInsights(t *testing.T) {
Expect := NewWithT(t).Expect

Expand Down

0 comments on commit 9831969

Please sign in to comment.