Skip to content

Commit

Permalink
[Test] Be able to configure ES host/port via ENV var in test env
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Jul 12, 2014
1 parent c60ce38 commit 6b9a77b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CHANGES

2014-07-12
- Be able to configure ES host/port via ENV var in test env

2014-07-07
- Fix FunstionScore Query random_score without seed bug. #647

Expand Down
5 changes: 4 additions & 1 deletion test/lib/Elastica/Test/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ class Base extends \PHPUnit_Framework_TestCase
{
protected function _getClient()
{
return new Client();
return new Client(array(
'host' => getenv('ES_HOST') ?: 'localhost',
'port' => getenv('ES_PORT') ?: 9200,
));
}

/**
Expand Down

0 comments on commit 6b9a77b

Please sign in to comment.