Skip to content

Commit 8fd9102

Browse files
committed
[Test] Be able to configure ES host/port via ENV var in test env
1 parent c60ce38 commit 8fd9102

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/lib/Elastica/Test/Base.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ class Base extends \PHPUnit_Framework_TestCase
88
{
99
protected function _getClient()
1010
{
11-
return new Client();
11+
return new Client(array(
12+
'host' => getenv('ELASTICSEARCH_HOST') ?: 'localhost',
13+
'port' => getenv('ELASTICSEARCH_PORT') ?: 9200,
14+
));
1215
}
1316

1417
/**

0 commit comments

Comments
 (0)