-
Notifications
You must be signed in to change notification settings - Fork 386
Expand file tree
/
Copy pathoverride_test.go
More file actions
50 lines (41 loc) · 1.36 KB
/
override_test.go
File metadata and controls
50 lines (41 loc) · 1.36 KB
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
47
48
49
50
package integration_test
import (
"path/filepath"
"testing"
"github.com/cloudfoundry/switchblade"
"github.com/sclevine/spec"
. "github.com/cloudfoundry/switchblade/matchers"
. "github.com/onsi/gomega"
)
func testOverride(platform switchblade.Platform, fixtures string) func(*testing.T, spec.G, spec.S) {
return func(t *testing.T, context spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect
name string
)
it.Before(func() {
var err error
name, err = switchblade.RandomName()
Expect(err).NotTo(HaveOccurred())
println(name)
})
it.After(func() {
Expect(platform.Delete.Execute(name)).To(Succeed())
})
it("installs node from override buildpack", func() {
_, logs, err := platform.Deploy.
WithBuildpacks(
"override_buildpack",
"nodejs_buildpack",
).
Execute(name, filepath.Join(fixtures, "simple"))
Expect(err).To(HaveOccurred())
Expect(logs.String()).To(SatisfyAll(
ContainLines(ContainSubstring("-----> OverrideYML Buildpack")),
ContainLines(ContainSubstring("-----> Installing node")),
ContainLines(MatchRegexp("Copy .*/node.tgz")),
ContainLines(ContainSubstring("Unable to install node: dependency sha256 mismatch: expected sha256 062d906c87839d03b243e2821e10653c89b4c92878bfe2bf995dec231e117bfc, actual sha256 b56b58ac21f9f42d032e1e4b8bf8b8823e69af5411caa15aee2b140bc756962f")),
))
})
}
}