diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-02-21 07:36:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 07:36:43 +0100 |
commit | 98ed72b3ed7e81a75d9a323c70a5e7f5af265a23 (patch) | |
tree | a92d3ab78f2fa52969139448a8aa7c509ed97af5 /build/integration/features/bootstrap | |
parent | 93e703bbfc7c8ef654b7b0185474397ec1bbaa6b (diff) | |
download | nextcloud-server-98ed72b3ed7e81a75d9a323c70a5e7f5af265a23.tar.gz nextcloud-server-98ed72b3ed7e81a75d9a323c70a5e7f5af265a23.zip |
Revert "fix(performance): Do not set up filesystem on every call"
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r-- | build/integration/features/bootstrap/ChecksumsContext.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/ChecksumsContext.php b/build/integration/features/bootstrap/ChecksumsContext.php index f45bbf5e94f..ae44fcb1503 100644 --- a/build/integration/features/bootstrap/ChecksumsContext.php +++ b/build/integration/features/bootstrap/ChecksumsContext.php @@ -231,4 +231,31 @@ class ChecksumsContext implements \Behat\Behat\Context\Context { throw new \Exception("Expected no checksum header but got ".$this->response->getHeader('OC-Checksum')[0]); } } + + /** + * @Given user :user uploads chunk file :num of :total with :data to :destination with checksum :checksum + * @param string $user + * @param int $num + * @param int $total + * @param string $data + * @param string $destination + * @param string $checksum + */ + public function userUploadsChunkFileOfWithToWithChecksum($user, $num, $total, $data, $destination, $checksum) { + $num -= 1; + $this->response = $this->client->put( + $this->baseUrl . '/remote.php/webdav' . $destination . '-chunking-42-'.$total.'-'.$num, + [ + 'auth' => [ + $user, + $this->getPasswordForUser($user) + ], + 'body' => $data, + 'headers' => [ + 'OC-Checksum' => $checksum, + 'OC-Chunked' => '1', + ] + ] + ); + } } |