diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-04-11 21:29:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-11 21:29:58 +0200 |
commit | 8175ac6ecd58f08417fc5129af6a490fd3a4bc3b (patch) | |
tree | 801cc5d01210365dead23281156be0276270ca8e | |
parent | 53ac8427555c8248973c22bb3f337d48ba88827e (diff) | |
parent | 4cf61481e5e3c4be2637b6ad4d1ad069b3a46e7d (diff) | |
download | nextcloud-server-8175ac6ecd58f08417fc5129af6a490fd3a4bc3b.tar.gz nextcloud-server-8175ac6ecd58f08417fc5129af6a490fd3a4bc3b.zip |
Merge pull request #4302 from nextcloud/test-integration-test
[Integration Tests] Clear opcode cache after config change
-rw-r--r-- | apps/testing/clean_opcode_cache.php | 22 | ||||
-rw-r--r-- | build/integration/features/bootstrap/CommandLine.php | 8 | ||||
-rw-r--r-- | build/integration/features/maintenance-mode.feature | 7 |
3 files changed, 36 insertions, 1 deletions
diff --git a/apps/testing/clean_opcode_cache.php b/apps/testing/clean_opcode_cache.php new file mode 100644 index 00000000000..d48d3131b70 --- /dev/null +++ b/apps/testing/clean_opcode_cache.php @@ -0,0 +1,22 @@ +<?php +/** + * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +opcache_reset(); diff --git a/build/integration/features/bootstrap/CommandLine.php b/build/integration/features/bootstrap/CommandLine.php index c0caf5f8e6e..e880cfe24ab 100644 --- a/build/integration/features/bootstrap/CommandLine.php +++ b/build/integration/features/bootstrap/CommandLine.php @@ -35,7 +35,7 @@ trait CommandLine { /** * Invokes an OCC command * - * @param string OCC command, the part behind "occ". For example: "files:transfer-ownership" + * @param []string $args OCC command, the part behind "occ". For example: "files:transfer-ownership" * @return int exit code */ public function runOcc($args = []) { @@ -54,6 +54,12 @@ trait CommandLine { $this->lastStdOut = stream_get_contents($pipes[1]); $this->lastStdErr = stream_get_contents($pipes[2]); $this->lastCode = proc_close($process); + + // Clean opcode cache + $client = new GuzzleHttp\Client(); + $request = $client->createRequest('GET', 'http://localhost:8080/apps/testing/clean_opcode_cache.php'); + $client->send($request); + return $this->lastCode; } diff --git a/build/integration/features/maintenance-mode.feature b/build/integration/features/maintenance-mode.feature index a2e61a7e605..56d3b9c0fb6 100644 --- a/build/integration/features/maintenance-mode.feature +++ b/build/integration/features/maintenance-mode.feature @@ -2,33 +2,40 @@ Feature: maintenance-mode Background: Given Maintenance mode is enabled + Then the command was successful Scenario: Accessing /index.php with maintenance mode enabled When requesting "/index.php" with "GET" Then the HTTP status code should be "503" Then Maintenance mode is disabled + And the command was successful Scenario: Accessing /remote.php/webdav with maintenance mode enabled When requesting "/remote.php/webdav" with "GET" Then the HTTP status code should be "503" Then Maintenance mode is disabled + And the command was successful Scenario: Accessing /remote.php/dav with maintenance mode enabled When requesting "/remote.php/dav" with "GET" Then the HTTP status code should be "503" Then Maintenance mode is disabled + And the command was successful Scenario: Accessing /ocs/v1.php with maintenance mode enabled When requesting "/ocs/v1.php" with "GET" Then the HTTP status code should be "503" Then Maintenance mode is disabled + And the command was successful Scenario: Accessing /ocs/v2.php with maintenance mode enabled When requesting "/ocs/v2.php" with "GET" Then the HTTP status code should be "503" Then Maintenance mode is disabled + And the command was successful Scenario: Accessing /public.php/webdav with maintenance mode enabled When requesting "/public.php/webdav" with "GET" Then the HTTP status code should be "503" Then Maintenance mode is disabled + And the command was successful |