diff options
author | VicDeo <dubiniuk@owncloud.com> | 2016-09-08 22:54:14 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2016-10-04 19:02:04 +0300 |
commit | 82cd86a2079c515df5889648c828c29e51424dab (patch) | |
tree | 20755c0a216a002157d25ab0dc045c5e5cacdedb /tests | |
parent | 8b20b12584bb49b46913ffb9ed273c15b245cc27 (diff) |
Allow one more origin. Log the reason of occ controller failure (#26031)
* Log the reason of occ controller failure
* Allow requests from SERVER_ADDR
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/OccControllerTest.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/Core/Controller/OccControllerTest.php b/tests/Core/Controller/OccControllerTest.php index 682d9170096..46221d68b54 100644 --- a/tests/Core/Controller/OccControllerTest.php +++ b/tests/Core/Controller/OccControllerTest.php @@ -46,7 +46,8 @@ class OccControllerTest extends TestCase { private $console; public function testFromInvalidLocation(){ - $this->getControllerMock('example.org'); + $fakeHost = 'example.org'; + $this->getControllerMock($fakeHost); $response = $this->controller->execute('status', ''); $responseData = $response->getData(); @@ -55,7 +56,7 @@ class OccControllerTest extends TestCase { $this->assertEquals(126, $responseData['exitCode']); $this->assertArrayHasKey('details', $responseData); - $this->assertEquals('Web executor is not allowed to run from a different host', $responseData['details']); + $this->assertEquals('Web executor is not allowed to run from a host ' . $fakeHost, $responseData['details']); } public function testNotWhiteListedCommand(){ @@ -136,7 +137,10 @@ class OccControllerTest extends TestCase { 'core', $this->request, $this->config, - $this->console + $this->console, + $this->getMockBuilder('\OCP\ILogger') + ->disableOriginalConstructor() + ->getMock() ); } |