]> source.dussan.org Git - nextcloud-server.git/commitdiff
Creating the folder when the tests run
authorSergio Bertolín <sbertolin@solidgear.es>
Tue, 30 Aug 2016 10:53:19 +0000 (10:53 +0000)
committerSergio Bertolín <sbertolin@solidgear.es>
Wed, 31 Aug 2016 10:29:58 +0000 (10:29 +0000)
Conflicts:
build/integration/features/bootstrap/BasicStructure.php
build/integration/run.sh

build/integration/features/bootstrap/BasicStructure.php
build/integration/run.sh

index f693a242e17ea793def4ac412c193027fbf45c24..3b42c7fb06773afda29ff9db61b96d9674ef35b2 100644 (file)
@@ -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);
+               }
+       }
 }
 
index 5a222bda3e3f908efb8791c8be0c009faffc950f..ac8c61893afa1331d5b734fa989bc2c42831573c 100755 (executable)
@@ -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=$?