Skip to content

Commit ab1b847

Browse files
committed
- attempt to use version_compare and ELASTICSEARCH_VERSION
1 parent 4891222 commit ab1b847

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

env/elasticsearch/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM elasticsearch:2.3.2
22
MAINTAINER Nicolas Ruflin <[email protected]>
33

44
# Dependencies
5+
ENV ELASTICSEARCH_VERSION 2.3.2
56
ENV ES_IMAGE_PLUGIN_VER 1.7.1
67
ENV ES_PLUGIN_BIN /usr/share/elasticsearch/bin/plugin
78

test/lib/Elastica/Test/ClientTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public function testConstruct()
2929
public function testGetVersion()
3030
{
3131
$client = $this->_getClient();
32-
$this->assertNotEmpty($version = $client->getVersion());
33-
$this->assertSame($version, $client->getVersion());
32+
$this->assertNotEmpty($client->getVersion());
33+
$this->assertTrue(version_compare($client->getVersion(), $_SERVER['ELASTICSEARCH_VERSION'], '>='));
3434
}
3535

3636
/**

0 commit comments

Comments
 (0)