diff options
author | Robin Appelman <robin@icewind.nl> | 2017-10-09 19:05:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 19:05:16 +0300 |
commit | df2fa2fce29dd591e201c088ab8b714dd3915318 (patch) | |
tree | ec2e2825be01e6966e51793be11a83b99bce4e1d /tests | |
parent | 0577336105489bcae87f348168279868e5615ffb (diff) | |
parent | 239f561ab2210e4c3b55075aa7ed9df94139d4d2 (diff) |
Merge pull request #6737 from nextcloud/aws-sdk-12
[12] Update aws sdk + s3 improvements
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/ObjectStore/S3Test.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/lib/Files/ObjectStore/S3Test.php b/tests/lib/Files/ObjectStore/S3Test.php index b93e9beebdc..14167656fb5 100644 --- a/tests/lib/Files/ObjectStore/S3Test.php +++ b/tests/lib/Files/ObjectStore/S3Test.php @@ -23,19 +23,32 @@ namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\S3; +class MultiPartUploadS3 extends S3 { + public function multiPartUpload($urn, $stream) { + parent::multiPartUpload($urn, $stream); + } +} + /** * @group PRIMARY-s3 */ class S3Test extends ObjectStoreTest { - /** - * @return \OCP\Files\ObjectStore\IObjectStore - */ protected function getInstance() { $config = \OC::$server->getConfig()->getSystemValue('objectstore'); if (!is_array($config) || $config['class'] !== 'OC\\Files\\ObjectStore\\S3') { $this->markTestSkipped('objectstore not configured for s3'); } - return new S3($config['arguments']); + return new MultiPartUploadS3($config['arguments']); + } + + public function testMultiPartUploader() { + $s3 = $this->getInstance(); + + $s3->multiPartUpload('multiparttest', fopen(__FILE__, 'r')); + + $result = $s3->readObject('multiparttest'); + + $this->assertEquals(file_get_contents(__FILE__), stream_get_contents($result)); } } |