Skip to content

Commit

Permalink
internal: add missing exposed port for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
jzelinskie authored and vroldanbet committed Mar 20, 2024
1 parent 639db11 commit 106d855
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/testserver/datastore/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

const (
mysqlPort = 3306
mysqlPortStr = "3306/tcp"
defaultCreds = "root:secret"
testDBPrefix = "spicedb_test_"
)
Expand Down Expand Up @@ -61,6 +62,7 @@ func RunMySQLForTestingWithOptions(t testing.TB, options MySQLTesterOptions, bri
Repository: "mysql",
Tag: containerImageTag,
Env: []string{"MYSQL_ROOT_PASSWORD=secret"},
ExposedPorts: []string{mysqlPortStr},
// increase max connections (default 151) to accommodate tests using the same docker container
Cmd: []string{"--max-connections=500"},
NetworkID: bridgeNetworkName,
Expand All @@ -75,7 +77,7 @@ func RunMySQLForTestingWithOptions(t testing.TB, options MySQLTesterOptions, bri
require.NoError(t, pool.Purge(resource))
})

port := resource.GetPort(fmt.Sprintf("%d/tcp", mysqlPort))
port := resource.GetPort(mysqlPortStr)
if bridgeNetworkName != "" {
builder.hostname = name
builder.port = fmt.Sprintf("%d", mysqlPort)
Expand Down

0 comments on commit 106d855

Please sign in to comment.