summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-03-08 16:28:44 +0100
committerJulius Härtl <jus@bitgrid.net>2023-03-08 20:23:29 +0100
commitd2a05716753cc9297fa38e88a43e39dec71f3b40 (patch)
tree7f55297e05c4327318f8c4c9cae8af1be1db7b64 /build/integration/features/bootstrap
parent237dcda8fd46f3bfe27ebf74baaebd3867aba795 (diff)
downloadnextcloud-server-d2a05716753cc9297fa38e88a43e39dec71f3b40.tar.gz
nextcloud-server-d2a05716753cc9297fa38e88a43e39dec71f3b40.zip
tests(integration): Fix catching error only on object store
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r--build/integration/features/bootstrap/WebDav.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 00ba5c28862..9c81a5817b4 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -1078,4 +1078,20 @@ trait WebDav {
public function theSmultipartUploadWasSuccessful($status) {
Assert::assertEquals((int)$status, $this->response->getStatusCode());
}
+
+ /**
+ * @Then /^the upload should fail on object storage$/
+ */
+ public function theUploadShouldFailOnObjectStorage() {
+ $descriptor = [
+ 0 => ['pipe', 'r'],
+ 1 => ['pipe', 'w'],
+ 2 => ['pipe', 'w'],
+ ];
+ $process = proc_open('php occ config:system:get objectstore --no-ansi', $descriptor, $pipes, '../../');
+ $lastCode = proc_close($process);
+ if ($lastCode === 0) {
+ $this->theHTTPStatusCodeShouldBe(500);
+ }
+ }
}