forked from cloudfoundry/bbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bbs_suite_test.go
50 lines (38 loc) · 1.05 KB
/
bbs_suite_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
47
48
49
50
package bbs_test
import (
"code.cloudfoundry.org/bbs/test_helpers"
"code.cloudfoundry.org/consuladapter"
"code.cloudfoundry.org/consuladapter/consulrunner"
"code.cloudfoundry.org/lager/lagertest"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/gomega"
"testing"
)
var consulRunner *consulrunner.ClusterRunner
var consulClient consuladapter.Client
var logger *lagertest.TestLogger
var consulHelper *test_helpers.ConsulHelper
var _ = BeforeSuite(func() {
logger = lagertest.NewTestLogger("test")
consulRunner = consulrunner.NewClusterRunner(
9001+config.GinkgoConfig.ParallelNode*consulrunner.PortOffsetLength,
1,
"http",
)
logger = lagertest.NewTestLogger("test")
consulRunner.Start()
consulRunner.WaitUntilReady()
})
var _ = AfterSuite(func() {
consulRunner.Stop()
})
var _ = BeforeEach(func() {
_ = consulRunner.Reset()
consulClient = consulRunner.NewClient()
consulHelper = test_helpers.NewConsulHelper(logger, consulClient)
})
func TestBbs(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "BBS Suite")
}