mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-12 06:29:36 +00:00
fixes and improvements
This commit is contained in:
@@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
namespace Testcontainers\Modules;
|
||||
|
||||
use Testcontainers\Container\GenericContainer;
|
||||
use Testcontainers\Wait\WaitForLog;
|
||||
use Testcontainers\Wait\WaitForExec;
|
||||
|
||||
class MariaDBContainer extends GenericContainer
|
||||
{
|
||||
@@ -13,8 +13,12 @@ class MariaDBContainer extends GenericContainer
|
||||
{
|
||||
parent::__construct('mariadb:' . $version);
|
||||
$this->withExposedPorts(3306);
|
||||
$this->withWait(new WaitForLog('ready for connections'));
|
||||
$this->withEnvironment('MARIADB_ROOT_PASSWORD', $mysqlRootPassword);
|
||||
$this->withWait(new WaitForExec([
|
||||
"mariadb-admin",
|
||||
"ping",
|
||||
"-h", "127.0.0.1",
|
||||
]));
|
||||
}
|
||||
|
||||
public function withMariaDBUser(string $username, string $password): self
|
||||
|
||||
Reference in New Issue
Block a user