forked from paketo-buildpacks/jammy-full-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_test.go
46 lines (34 loc) · 1.01 KB
/
init_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package acceptance_test
import (
"fmt"
"path/filepath"
"testing"
"time"
"github.com/google/uuid"
"github.com/onsi/gomega/format"
"github.com/sclevine/spec"
"github.com/sclevine/spec/report"
. "github.com/onsi/gomega"
)
var stack struct {
BuildArchive string
RunArchive string
BuildImageID string
RunImageID string
}
func by(_ string, f func()) { f() }
func TestAcceptance(t *testing.T) {
format.MaxLength = 0
SetDefaultEventuallyTimeout(30 * time.Second)
Expect := NewWithT(t).Expect
root, err := filepath.Abs(".")
Expect(err).ToNot(HaveOccurred())
stack.BuildArchive = filepath.Join(root, "build", "build.oci")
stack.BuildImageID = fmt.Sprintf("stack-build-%s", uuid.NewString())
stack.RunArchive = filepath.Join(root, "build", "run.oci")
stack.RunImageID = fmt.Sprintf("stack-run-%s", uuid.NewString())
suite := spec.New("Acceptance", spec.Report(report.Terminal{}), spec.Parallel())
suite("Metadata", testMetadata)
suite("BuildpackIntegration", testBuildpackIntegration)
suite.Run(t)
}