getMySQLContainer creates a MySQL container for testing
(ctx context.Context)
| 31 | |
| 32 | // getMySQLContainer creates a MySQL container for testing |
| 33 | func 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 | } |