MCPcopy Create free account
hub / github.com/bytebase/bytebase / GetTestTiDBContainer

Function GetTestTiDBContainer

backend/common/testcontainer/testcontainer.go:522–529  ·  view source on GitHub ↗

GetTestTiDBContainer is a helper function for tests that creates a TiDB container and handles the error by failing the test if container creation fails

(ctx context.Context, t testing.TB)

Source from the content-addressed store, hash-verified

520// GetTestTiDBContainer is a helper function for tests that creates a TiDB container
521// and handles the error by failing the test if container creation fails
522func GetTestTiDBContainer(ctx context.Context, t testing.TB) *Container {
523 t.Helper()
524 container, err := GetTiDBContainer(ctx)
525 if err != nil {
526 t.Fatalf("failed to create TiDB container: %v", err)
527 }
528 return container
529}
530
531// MongoDBContainer represents a MongoDB container with its connection details
532type MongoDBContainer struct {

Calls 2

GetTiDBContainerFunction · 0.85
FatalfMethod · 0.80