MCPcopy Index your code
hub / github.com/bytebase/bytebase / getMySQLContainer

Function getMySQLContainer

backend/tests/testcontainer.go:33–44  ·  view source on GitHub ↗

getMySQLContainer creates a MySQL container for testing

(ctx context.Context)

Source from the content-addressed store, hash-verified

31
32// getMySQLContainer creates a MySQL container for testing
33func getMySQLContainer(ctx context.Context) (*Container, error) {
34 tc, err := testcontainer.GetTestMySQLContainer(ctx)
35 if err != nil {
36 return nil, err
37 }
38 return &Container{
39 Container: tc,
40 host: tc.GetHost(),
41 port: tc.GetPort(),
42 db: tc.GetDB(),
43 }, nil
44}

Callers 14

TestSyncerForMySQLFunction · 0.85
TestSQLAdminQueryFunction · 0.85
TestGhostSchemaUpdateFunction · 0.85
TestSQLQueryStopOnErrorFunction · 0.85
TestSQLExportFunction · 0.85
TestSQLReviewForMySQLFunction · 0.85
TestGetLatestSchemaFunction · 0.85
TestSensitiveDataFunction · 0.85

Calls 4

GetTestMySQLContainerFunction · 0.92
GetDBMethod · 0.65
GetHostMethod · 0.45
GetPortMethod · 0.45

Tested by 14

TestSyncerForMySQLFunction · 0.68
TestSQLAdminQueryFunction · 0.68
TestGhostSchemaUpdateFunction · 0.68
TestSQLQueryStopOnErrorFunction · 0.68
TestSQLExportFunction · 0.68
TestSQLReviewForMySQLFunction · 0.68
TestGetLatestSchemaFunction · 0.68
TestSensitiveDataFunction · 0.68