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)
| 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 |
| 522 | func 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 |
| 532 | type MongoDBContainer struct { |