MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / startMySQL

Method startMySQL

server/tests/helpers/testDbManager.js:127–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125 }
126
127 async startMySQL() {
128 this.container = await new GenericContainer("mysql:8.0")
129 .withEnvironment({
130 MYSQL_ROOT_PASSWORD: this.password,
131 MYSQL_DATABASE: this.database,
132 })
133 .withExposedPorts(3306)
134 .withWaitStrategy(
135 Wait.forAll([
136 Wait.forLogMessage("ready for connections"),
137 Wait.forListeningPorts()
138 ])
139 )
140 .withStartupTimeout(60000) // 60 seconds timeout
141 .start();
142
143 this.port = this.container.getMappedPort(3306);
144
145 // Additional wait to ensure MySQL is truly ready
146 console.log("⏳ Waiting for MySQL to be fully ready...");
147 await new Promise((resolve) => setTimeout(resolve, 2000));
148 }
149
150 async startPostgres() {
151 this.container = await new GenericContainer("postgres:15")

Callers 1

startMethod · 0.95

Calls 1

startMethod · 0.80

Tested by

no test coverage detected