github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/pkg/mock/mock_cluster_test.go (about)

     1  // Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0.
     2  
     3  package mock_test
     4  
     5  import (
     6  	"testing"
     7  
     8  	. "github.com/pingcap/check"
     9  	"github.com/pingcap/tidb/util/testleak"
    10  
    11  	"github.com/pingcap/br/pkg/mock"
    12  )
    13  
    14  func Test(t *testing.T) {
    15  	TestingT(t)
    16  }
    17  
    18  var _ = Suite(&testClusterSuite{})
    19  
    20  type testClusterSuite struct {
    21  	mock *mock.Cluster
    22  }
    23  
    24  func (s *testClusterSuite) SetUpSuite(c *C) {
    25  	var err error
    26  	s.mock, err = mock.NewCluster()
    27  	c.Assert(err, IsNil)
    28  }
    29  
    30  func (s *testClusterSuite) TearDownSuite(c *C) {
    31  	testleak.AfterTest(c)()
    32  }
    33  
    34  func (s *testClusterSuite) TestSmoke(c *C) {
    35  	c.Assert(s.mock.Start(), IsNil)
    36  	s.mock.Stop()
    37  }