diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-07 20:55:49 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-07 21:20:13 +0100 |
commit | 7301b43eb6a806f62897223db57f9ff51cb1afb5 (patch) | |
tree | 65c858aebc8639dd93cc2df08fce8242a500533e /build/integration/features/bootstrap/WebDav.php | |
parent | e08f98075cff2087daba94cce1fb7e48e9d3c3ad (diff) | |
download | nextcloud-server-7301b43eb6a806f62897223db57f9ff51cb1afb5.tar.gz nextcloud-server-7301b43eb6a806f62897223db57f9ff51cb1afb5.zip |
Added tests
* Unit tests for OC_Filechunking to verify the isComplete function
* Intergration tests to show that shuffling chunks is all fine
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 11 |
1 files changed, 11 insertions, 0 deletions
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); + } + } |