本文整理汇总了Golang中github.com/stretchr/testify/suite.Run函数的典型用法代码示例。如果您正苦于以下问题:Golang Run函数的具体用法?Golang Run怎么用?Golang Run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Run函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestSpecificSuites
func TestSpecificSuites(t *testing.T) {
switch os.Getenv("SODA_DIALECT") {
case "postgres":
suite.Run(t, &PostgreSQLSuite{})
case "mysql":
suite.Run(t, &MySQLSuite{})
case "sqlite":
suite.Run(t, &SQLiteSuite{})
}
}
示例2: TestClientSuite_RabbitTransport
func TestClientSuite_RabbitTransport(t *testing.T) {
suite.Run(t, &clientSuite{
TransF: func() transport.Transport {
return rabbit.NewTransport()
},
})
}
示例3: TestBridgeRemoteSuite
func TestBridgeRemoteSuite(t *testing.T) {
suite.Run(t, &remoteBridgeTestSuite{
bridgeTestSuite: bridgeTestSuite{
name: "",
},
})
}
示例4: TestHeartbeaterSuite
func TestHeartbeaterSuite(t *testing.T) {
pool, _ := conn.New(conn.ConnectionParam{
Address: "127.0.0.1:6379",
}, 1)
suite.Run(t, &HeartbeaterSuite{test.NewSuite(pool)})
}
示例5: TestLIFOProcessorSuite
func TestLIFOProcessorSuite(t *testing.T) {
pool, _ := conn.New(conn.ConnectionParam{
Address: "127.0.0.1:6379",
}, 1)
suite.Run(t, &LIFOProcessorTest{test.NewSuite(pool)})
}
示例6: TestJsonSafeMarshallerSuite
func TestJsonSafeMarshallerSuite(t *testing.T) {
suite.Run(t, &jsonSafeMarshallerTestSuite{
MarshallerTestSuite{
m: &CustomMarshaller{Codec: &JSONSafeCodec{}},
},
})
}
示例7: TestGobMarshallerSuite
func TestGobMarshallerSuite(t *testing.T) {
suite.Run(t, &gobMarshallerTestSuite{
MarshallerTestSuite{
m: &GobMarshaller{},
},
})
}
示例8: TestJsonMarshallerSuite
func TestJsonMarshallerSuite(t *testing.T) {
suite.Run(t, &jsonMarshallerTestSuite{
MarshallerTestSuite{
m: &JsonMarshaller{},
},
})
}
示例9: TestBridgeLocalSuite
func TestBridgeLocalSuite(t *testing.T) {
suite.Run(t, &localBridgeTestSuite{
bridgeTestSuite{
name: "local",
},
})
}
示例10: TestDingoAmqpSingleAppSuite
func TestDingoAmqpSingleAppSuite(t *testing.T) {
suite.Run(t, &amqpSingleAppTestSuite{
DingoSingleAppTestSuite{
GenApp: func() (app *dingo.App, err error) {
app, err = dingo.NewApp("remote", nil)
if err != nil {
return
}
brk, err := dgamqp.NewBroker(dgamqp.DefaultAmqpConfig())
if err != nil {
return
}
_, _, err = app.Use(brk, dingo.ObjT.Default)
if err != nil {
return
}
bkd, err := dgamqp.NewBackend(dgamqp.DefaultAmqpConfig())
if err != nil {
return
}
_, _, err = app.Use(bkd, dingo.ObjT.Default)
if err != nil {
return
}
return
},
},
})
}
示例11: TestIntegrationMigrateSuite
func TestIntegrationMigrateSuite(t *testing.T) {
migrateSuite := &IntegrationMigrateSuite{
Target: NewEtcdMigrationTarget(common.DefaultEtcdServerUrl, "gull", "default", true, NewNullLogger()),
}
suite.Run(t, migrateSuite)
_ = os.RemoveAll(testdata.ConvertDestination1)
}
示例12: TestZkSuite
func TestZkSuite(t *testing.T) {
if testing.Short() {
t.Skip("skip zk test")
return
}
suite.Run(t, new(zkSuite))
}
示例13: TestFormat1TestSuite
// In order for 'go test' to run this suite, we need to create
// a normal test function and pass our suite to suite.Run
func TestFormat1TestSuite(t *testing.T) {
//ts := new(Format1TestSuite)
log.Info("TestFormat1TestSuite - Running test suite")
suite.Run(t, new(Format1TestSuite))
log.Info("TestFormat1TestSuite - Finished test suite")
}
示例14: TestConnHashTestSuite
func TestConnHashTestSuite(t *testing.T) {
if testing.Short() {
t.Skip("Skipping zk shard test in short mode.")
}
//launch zk
sl := test.NewServiceLauncher()
etcdOriPort, stopEtcd, err := sl.Start(test.Etcd)
assert.NoError(t, err)
s := new(ConnHashTestSuite)
s.etcdOriPort = etcdOriPort
s.etcdPort = 3333 // used for port forward
s.forwarder = portForwarder(
fmt.Sprintf(":%d", s.etcdPort), fmt.Sprintf(":%d", s.etcdOriPort))
s.stopForward, err = s.forwarder()
assert.NoError(t, err, "no error")
// non-forward etcdCli
etcdCli = etcd.NewClient([]string{fmt.Sprintf("http://localhost:%d", etcdOriPort)})
// forwardable etcdCli
etcdForwdCli = etcd.NewClient([]string{fmt.Sprintf("http://localhost:%d", s.etcdPort)})
suite.Run(t, s)
// clean up the forwarding
s.stopForward <- struct{}{}
etcdCli.Close()
etcdForwdCli.Close()
assert.NoError(s.T(), stopEtcd())
}
示例15: TestRedisSuite
func TestRedisSuite(t *testing.T) {
if testing.Short() {
t.Skip("skip redis test")
return
}
suite.Run(t, new(redisSuite))
}