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 Bertolín <sbertolin@solidgear.es>2016-08-30 13:53:19 +0300
committerSergio Bertolín <sbertolin@solidgear.es>2016-08-31 13:29:58 +0300
commitcc0e0960772040f241422d82e91377b20ed3fc13 (patch)
treed5d28e080ebc0035fa03fad5e8d73485f23245fe /build
parent5c1940b4ef84cb6970ff1c7df02d0bcdc977ad5e (diff)
Creating the folder when the tests run
Conflicts: build/integration/features/bootstrap/BasicStructure.php build/integration/run.sh
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/BasicStructure.php24
-rwxr-xr-xbuild/integration/run.sh10
2 files changed, 34 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php
index f693a242e17..3b42c7fb067 100644
--- a/build/integration/features/bootstrap/BasicStructure.php
+++ b/build/integration/features/bootstrap/BasicStructure.php
@@ -308,5 +308,29 @@ trait BasicStructure {
rmdir("../../core/skeleton/PARENT");
}
}
+
+ /**
+ * @BeforeScenario @local_storage
+ */
+ public static function removeFilesFromLocalStorageBefore(){
+ $dir = "./work/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);
+ }
+ }
+
+ /**
+ * @AfterScenario @local_storage
+ */
+ public static function removeFilesFromLocalStorageAfter(){
+ $dir = "./work/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/run.sh b/build/integration/run.sh
index 5a222bda3e3..ac8c61893af 100755
--- a/build/integration/run.sh
+++ b/build/integration/run.sh
@@ -24,6 +24,16 @@ echo $PHPPID_FED
export TEST_SERVER_URL="http://localhost:$PORT/ocs/"
export TEST_SERVER_FED_URL="http://localhost:$PORT_FED/ocs/"
+#Enable external storage app
+../../occ app:enable files_external
+
+mkdir -p work/local_storage
+OUTPUT_CREATE_STORAGE=`../../occ files_external:create local_storage local null::null -c datadir=./build/integration/work/local_storage`
+
+ID_STORAGE=`echo $OUTPUT_CREATE_STORAGE | awk {'print $5'}`
+
+../../occ files_external:option $ID_STORAGE enable_sharing true
+
vendor/bin/behat -f junit -f pretty $SCENARIO_TO_RUN
RESULT=$?