diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-07-29 06:40:39 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-07-29 10:03:46 +0200 |
commit | 6f34c37cfbaab73d13ba552d500311431cfd6303 (patch) | |
tree | 2f0a967d7ae584ca8444cda25c76a5beea8a9a67 /build/integration/features/bootstrap/WebDav.php | |
parent | 54ae8eede39e58c890a42b44505a254fc5f94765 (diff) | |
download | nextcloud-server-6f34c37cfbaab73d13ba552d500311431cfd6303.tar.gz nextcloud-server-6f34c37cfbaab73d13ba552d500311431cfd6303.zip |
Adding quota plugin to new dav endpoint (#25615)
* Adding quota plugin to new dav endpoint
* Added integrated test failing in old endpoint
* Added 0B quota test
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 9b0050d82dd..71f938c7ec4 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -50,6 +50,18 @@ trait WebDav { $this->davPath = $davPath; } + /** + * @return string + */ + public function getFilesPath() { + if ($this->davPath === 'remote.php/dav') { + $basePath = '/files/' . $this->currentUser . '/'; + } else { + $basePath = '/'; + } + return $basePath; + } + public function makeDavRequest($user, $method, $path, $headers, $body = null){ $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath . "$path"; $client = new GClient(); @@ -413,9 +425,9 @@ trait WebDav { * @param string $user * @param string $destination */ - public function userCreatedAFolder($user, $destination){ + public function userCreatedAFolder($user, $destination) { try { - $this->response = $this->makeDavRequest($user, "MKCOL", $destination, []); + $this->response = $this->makeDavRequest($user, "MKCOL", $this->getFilesPath() . ltrim($destination, $this->getFilesPath()), []); } catch (\GuzzleHttp\Exception\ServerException $e) { // 4xx and 5xx responses cause an exception $this->response = $e->getResponse(); |