From 7301b43eb6a806f62897223db57f9ff51cb1afb5 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 7 Mar 2016 20:55:49 +0100 Subject: Added tests * Unit tests for OC_Filechunking to verify the isComplete function * Intergration tests to show that shuffling chunks is all fine --- build/integration/features/bootstrap/WebDav.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build/integration/features/bootstrap/WebDav.php') diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index fa6761d9f71..0430768022c 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -262,5 +262,16 @@ trait WebDav { } } + /** + * @Given user :user uploads chunk file :num of :total with :data to :destination + */ + public function userUploadsChunkFileOfWithToWithChecksum($user, $num, $total, $data, $destination) + { + $num -= 1; + $data = \GuzzleHttp\Stream\Stream::factory($data); + $file = $destination . '-chunking-42-'.$total.'-'.$num; + $this->makeDavRequest($user, 'PUT', $file, ['OC-Chunked' => '1'], $data); + } + } -- cgit v1.2.3