mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-11 00:29:31 +00:00
fixes and improvements
This commit is contained in:
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Testcontainers\Container;
|
||||
|
||||
use Testcontainers\Wait\WaitForLog;
|
||||
use Testcontainers\Wait\WaitForExec;
|
||||
|
||||
/**
|
||||
* Left for namespace backward compatibility
|
||||
@@ -18,7 +18,11 @@ class MySQLContainer extends Container
|
||||
parent::__construct('mysql:' . $version);
|
||||
$this->withExposedPorts(3306);
|
||||
$this->withEnvironment('MYSQL_ROOT_PASSWORD', $mysqlRootPassword);
|
||||
$this->withWait(new WaitForLog('ready for connections'));
|
||||
$this->withWait(new WaitForExec([
|
||||
"mysqladmin",
|
||||
"ping",
|
||||
"-h", "127.0.0.1",
|
||||
]));
|
||||
}
|
||||
|
||||
public static function make(string $version = 'latest', string $mysqlRootPassword = 'root'): self
|
||||
|
||||
Reference in New Issue
Block a user