Permalink
Browse files

putting // slashes in a request for alias fail on ES6.x (#1355)

  • Loading branch information...
p365labs authored and ruflin committed Aug 22, 2017
1 parent 1822bc9 commit 48dc8efed87035c16053ead8a823263b860526ea
@@ -75,8 +75,6 @@ public function testFailIsValid()
*/
public function testConnection()
{
$this->markTestSkipped('ES6 update: Incorrect HTTP method for uri [//_aliases] and method [GET], allowed: [PUT]');
$count = 0;
$config = ['connectionStrategy' => function ($connections) use (&$count) {
@@ -86,7 +84,7 @@ public function testConnection()
}];
$client = $this->_getClient($config);
$response = $client->request('/_aliases');
$response = $client->request('_aliases');
$this->assertEquals(1, $count);
@@ -24,11 +24,9 @@ class RoundRobinTest extends Base
*/
public function testConnection()
{
$this->markTestSkipped('ES6 update: Incorrect HTTP method for uri [//_aliases] and method [GET], allowed: [PUT]');
$config = ['connectionStrategy' => 'RoundRobin'];
$client = $this->_getClient($config);
$response = $client->request('/_aliases');
$response = $client->request('_aliases');
/* @var $response Response */
$this->_checkResponse($response);
@@ -58,16 +56,14 @@ public function testFailConnection()
$this->_checkStrategy($client);
$client->request('/_aliases');
$client->request('_aliases');
}
/**
* @group functional
*/
public function testWithOneFailConnection()
{
$this->markTestSkipped('ES6 update: Incorrect HTTP method for uri [//_aliases] and method [GET], allowed: [PUT]');
$connections = [
new Connection(['host' => '255.255.255.0', 'timeout' => $this->_timeout]),
new Connection(['host' => $this->_getHost(), 'timeout' => $this->_timeout]),
@@ -81,7 +77,7 @@ public function testWithOneFailConnection()
$client = $this->_getClient(['connectionStrategy' => 'RoundRobin'], $callback);
$client->setConnections($connections);
$response = $client->request('/_aliases');
$response = $client->request('_aliases');
/* @var $response Response */
$this->_checkResponse($response);
@@ -110,7 +106,7 @@ public function testWithNoValidConnection()
$client->setConnections($connections);
try {
$client->request('/_aliases');
$client->request('_aliases');
$this->fail('Should throw exception as no connection valid');
} catch (ConnectionException $e) {
$this->assertEquals(count($connections), $count);
@@ -23,10 +23,8 @@ class SimpleTest extends Base
*/
public function testConnection()
{
$this->markTestSkipped('ES6 update: Incorrect HTTP method for uri [//_aliases] and method [GET], allowed: [PUT]');
$client = $this->_getClient();
$response = $client->request('/_aliases');
$response = $client->request('_aliases');
$this->_checkResponse($response);
@@ -44,16 +42,14 @@ public function testFailConnection()
$this->_checkStrategy($client);
$client->request('/_aliases');
$client->request('_aliases');
}
/**
* @group functional
*/
public function testWithOneFailConnection()
{
$this->markTestSkipped('ES6 update: Incorrect HTTP method for uri [//_aliases] and method [GET], allowed: [PUT]');
$connections = [
new Connection(['host' => '255.255.255.0', 'timeout' => $this->_timeout]),
new Connection(['host' => $this->_getHost(), 'timeout' => $this->_timeout]),
@@ -67,7 +63,7 @@ public function testWithOneFailConnection()
$client = $this->_getClient([], $callback);
$client->setConnections($connections);
$response = $client->request('/_aliases');
$response = $client->request('_aliases');
/* @var $response Response */
$this->_checkResponse($response);
@@ -96,7 +92,7 @@ public function testWithNoValidConnection()
$client->setConnections($connections);
try {
$client->request('/_aliases');
$client->request('_aliases');
$this->fail('Should throw exception as no connection valid');
} catch (ConnectionException $e) {
$this->assertEquals(count($connections), $count);

0 comments on commit 48dc8ef

Please sign in to comment.