Skip to content

Commit fd95dd2

Browse files
committed
Get it right with the proxy port numbers
1 parent 83dd6f1 commit fd95dd2

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

test/lib/Elastica/Test/Base.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@ protected function _getPort()
4646
*/
4747
protected function _getProxyUrl()
4848
{
49-
return "http://127.0.0.1:12346";
49+
return "http://127.0.0.1:12345";
50+
}
51+
52+
/**
53+
* @return string Proxy url string to proxy which returns 403
54+
*/
55+
protected function _getProxyUrl403()
56+
{
57+
return "http://127.0.0.1:12345";
5058
}
5159

5260
/**

test/lib/Elastica/Test/Transport/GuzzleTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testWithEnvironmentalProxy()
9797

9898
public function testWithEnabledEnvironmentalProxy()
9999
{
100-
putenv('http_proxy=' . $this->_getProxyUrl() . '/');
100+
putenv('http_proxy=' . $this->_getProxyUrl403() . '/');
101101

102102
$client = $this->_getClient(array('transport' => 'Guzzle', 'persistent' => false));
103103
$transferInfo = $client->request('/_nodes')->getTransferInfo();

test/lib/Elastica/Test/Transport/HttpTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function testWithEnvironmentalProxy()
153153

154154
public function testWithEnabledEnvironmentalProxy()
155155
{
156-
putenv('http_proxy=http://' . $this->_getProxyUrl() . '/');
156+
putenv('http_proxy=http://' . $this->_getProxyUrl403() . '/');
157157

158158
$client = new \Elastica\Client();
159159

0 commit comments

Comments
 (0)