Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2016-08-08 16:17:28 +0300
committerSergio BertolĂ­n <sbertolin@solidgear.es>2016-08-30 17:43:39 +0300
commit2061fed3e29501609cc1ab88c2a9213702024255 (patch)
tree62e9e5181f2f34b04ba26b8a354c0430d37cb3f1 /build
parent794229a783c4ec5708f016236fb92fa2b9873bb2 (diff)
Added feature and context, not working yet, option to allow sharing needs to be added
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/ExternalStorageContext.php24
-rw-r--r--build/integration/features/external-storage.feature26
2 files changed, 50 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/ExternalStorageContext.php b/build/integration/features/bootstrap/ExternalStorageContext.php
new file mode 100644
index 00000000000..90dc06cf571
--- /dev/null
+++ b/build/integration/features/bootstrap/ExternalStorageContext.php
@@ -0,0 +1,24 @@
+<?php
+
+
+require __DIR__ . '/../../vendor/autoload.php';
+
+use Behat\Gherkin\Node\TableNode;
+use GuzzleHttp\Client;
+use GuzzleHttp\Message\ResponseInterface;
+
+class ExternalStorageContext implements \Behat\Behat\Context\Context {
+
+
+ /**
+ * @AfterScenario
+ */
+ public static function removeFilesFromLocalStorage(){
+ $dir = "./local_storage/";
+ $di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);
+ $ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);
+ foreach ( $ri as $file ) {
+ $file->isDir() ? rmdir($file) : unlink($file);
+ }
+ }
+}
diff --git a/build/integration/features/external-storage.feature b/build/integration/features/external-storage.feature
new file mode 100644
index 00000000000..ac8bd971edf
--- /dev/null
+++ b/build/integration/features/external-storage.feature
@@ -0,0 +1,26 @@
+Feature: external-storage
+ Background:
+ Given using api version "1"
+ Given using dav path "remote.php/webdav"
+
+ Scenario: Share by link a file inside a local external storage
+ Given user "user0" exists
+ And user "user1" exists
+ And As an "user0"
+ And user "user0" created a folder "/local_storage/foo"
+ And User "user0" moved file "/textfile0.txt" to "/local_storage/foo/textfile0.txt"
+ And folder "/local_storage/foo" of user "user0" is shared with user "user1"
+ And As an "user1"
+ When creating a share with
+ | path | foo |
+ | shareType | 3 |
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And Share fields of last share match with
+ | id | A_NUMBER |
+ | url | AN_URL |
+ | token | A_TOKEN |
+ | mimetype | httpd/unix-directory |
+ And Public shared file "/foo/textfile0.txt" can be downloaded
+
+