当前位置: 首页>>代码示例>>Golang>>正文


Golang suite.Run函数代码示例

本文整理汇总了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{})
	}
}
开发者ID:markbates,项目名称:pop,代码行数:10,代码来源:pop_test.go

示例2: TestClientSuite_RabbitTransport

func TestClientSuite_RabbitTransport(t *testing.T) {
	suite.Run(t, &clientSuite{
		TransF: func() transport.Transport {
			return rabbit.NewTransport()
		},
	})
}
开发者ID:robmurtha,项目名称:mercury,代码行数:7,代码来源:client_test.go

示例3: TestBridgeRemoteSuite

func TestBridgeRemoteSuite(t *testing.T) {
	suite.Run(t, &remoteBridgeTestSuite{
		bridgeTestSuite: bridgeTestSuite{
			name: "",
		},
	})
}
开发者ID:MogeiWang,项目名称:dingo,代码行数:7,代码来源:bridge_remote_test.go

示例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)})
}
开发者ID:wulffeld,项目名称:redutil,代码行数:7,代码来源:heartbeater_test.go

示例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)})
}
开发者ID:wulffeld,项目名称:redutil,代码行数:7,代码来源:lifo_processor_test.go

示例6: TestJsonSafeMarshallerSuite

func TestJsonSafeMarshallerSuite(t *testing.T) {
	suite.Run(t, &jsonSafeMarshallerTestSuite{
		MarshallerTestSuite{
			m: &CustomMarshaller{Codec: &JSONSafeCodec{}},
		},
	})
}
开发者ID:MogeiWang,项目名称:dingo,代码行数:7,代码来源:marshaller_test.go

示例7: TestGobMarshallerSuite

func TestGobMarshallerSuite(t *testing.T) {
	suite.Run(t, &gobMarshallerTestSuite{
		MarshallerTestSuite{
			m: &GobMarshaller{},
		},
	})
}
开发者ID:MogeiWang,项目名称:dingo,代码行数:7,代码来源:marshaller_test.go

示例8: TestJsonMarshallerSuite

func TestJsonMarshallerSuite(t *testing.T) {
	suite.Run(t, &jsonMarshallerTestSuite{
		MarshallerTestSuite{
			m: &JsonMarshaller{},
		},
	})
}
开发者ID:MogeiWang,项目名称:dingo,代码行数:7,代码来源:marshaller_test.go

示例9: TestBridgeLocalSuite

func TestBridgeLocalSuite(t *testing.T) {
	suite.Run(t, &localBridgeTestSuite{
		bridgeTestSuite{
			name: "local",
		},
	})
}
开发者ID:MogeiWang,项目名称:dingo,代码行数:7,代码来源:bridge_local_test.go

示例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
			},
		},
	})
}
开发者ID:MogeiWang,项目名称:dingo,代码行数:31,代码来源:dingo_amqp_test.go

示例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)
}
开发者ID:C2FO,项目名称:gull,代码行数:7,代码来源:migration_integration_test.go

示例12: TestZkSuite

func TestZkSuite(t *testing.T) {
	if testing.Short() {
		t.Skip("skip zk test")
		return
	}
	suite.Run(t, new(zkSuite))
}
开发者ID:csigo,项目名称:test,代码行数:7,代码来源:zookeeper_test.go

示例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")

}
开发者ID:jlgerber,项目名称:sg-restful,代码行数:9,代码来源:format1_test.go

示例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())
}
开发者ID:csigo,项目名称:shard,代码行数:29,代码来源:shard_test.go

示例15: TestRedisSuite

func TestRedisSuite(t *testing.T) {
	if testing.Short() {
		t.Skip("skip redis test")
		return
	}
	suite.Run(t, new(redisSuite))
}
开发者ID:csigo,项目名称:test,代码行数:7,代码来源:redis_test.go


注:本文中的github.com/stretchr/testify/suite.Run函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。