Skip to content

Commit ee8b33f

Browse files
committed
Merge pull request #652 from lyrixx/test-env
[Test] Be able to configure ES host/port via ENV var in test env
2 parents c60ce38 + 6b9a77b commit ee8b33f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

changes.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGES
22

3+
2014-07-12
4+
- Be able to configure ES host/port via ENV var in test env
5+
36
2014-07-07
47
- Fix FunstionScore Query random_score without seed bug. #647
58

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('ES_HOST') ?: 'localhost',
13+
'port' => getenv('ES_PORT') ?: 9200,
14+
));
1215
}
1316

1417
/**

0 commit comments

Comments
 (0)