Skip to content

Commit

Permalink
Merge pull request #97 from getamis/contaner-options
Browse files Browse the repository at this point in the history
test: pass in container options
  • Loading branch information
markya0616 authored Sep 12, 2024
2 parents 4d09e85 + e53d50a commit cfe57fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func createMySQLDatabase(options SQLOptions) error {
// setup the mysql connection
// if TEST_MYSQL_HOST is defined, then we will use the connection directly.
// if not, a mysql container will be started
func SetupMySQL() (*MySQLContainer, error) {
func SetupMySQL(containerOptions ...Option) (*MySQLContainer, error) {
options := LoadMySQLOptions()
if _, ok := os.LookupEnv("TEST_MYSQL_HOST"); ok {

Expand All @@ -193,7 +193,7 @@ func SetupMySQL() (*MySQLContainer, error) {
}, nil
}

container, err := NewMySQLContainer(options)
container, err := NewMySQLContainer(options, containerOptions...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit cfe57fd

Please sign in to comment.