mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-12 09:29:35 +00:00
Adjust tests for OpenSearch
This commit is contained in:
@@ -12,9 +12,8 @@ class MySQLContainer extends GenericContainer
|
||||
{
|
||||
parent::__construct('mysql:' . $version);
|
||||
$this->withExposedPorts(3306);
|
||||
|
||||
$this->withWait(new WaitForLog('ready for connections'));
|
||||
$this->withEnvironment('MYSQL_ROOT_PASSWORD', $mysqlRootPassword);
|
||||
$this->withWait(new WaitForLog('ready for connections'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Testcontainers\Container;
|
||||
|
||||
use Testcontainers\Wait\WaitForHttp;
|
||||
use Testcontainers\Wait\WaitForLog;
|
||||
|
||||
class OpenSearchContainer extends GenericContainer
|
||||
{
|
||||
@@ -14,7 +15,11 @@ class OpenSearchContainer extends GenericContainer
|
||||
$this->withExposedPorts(9200);
|
||||
$this->withEnvironment('discovery.type', 'single-node');
|
||||
$this->withEnvironment('OPENSEARCH_INITIAL_ADMIN_PASSWORD', 'c3o_ZPHo!');
|
||||
$this->withWait(WaitForHttp::make(9200));
|
||||
$this->withWait(new WaitForLog(
|
||||
'/\]\s+started\?\[/',
|
||||
true,
|
||||
30000
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user