-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclusters_test.go
More file actions
47 lines (32 loc) · 829 Bytes
/
clusters_test.go
File metadata and controls
47 lines (32 loc) · 829 Bytes
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
package rac
import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"testing"
)
type clusterTestSuite struct {
suite.Suite
}
func TestClusterTestSuite(t *testing.T) {
suite.Run(t, new(clusterTestSuite))
}
func (s *clusterTestSuite) r() *require.Assertions {
return s.Require()
}
func (s *clusterTestSuite) AfterTest(suite, testName string) {
}
func (s *clusterTestSuite) BeforeTest(suite, testName string) {
}
func (s *clusterTestSuite) TearDownSuite() {
}
func (s *clusterTestSuite) TearDownTest() {
}
func (s *clusterTestSuite) SetupSuite() {
}
func (s *clusterTestSuite) TestClusterList() {
m, _ := NewManager("localhost:1545")
needLen := len(m.idxCluster)
resp, err := m.Clusters(ClustersList{})
s.r().NoError(err)
s.r().True(len(resp.List) == needLen, "len must be 1")
}