Browse Source
External storage was not enabled and content was not deleted before scenarios
pull/1196/head
Sergio Bertolín
9 years ago
committed by
Lukas Reschke
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
2 changed files with
19 additions and
1 deletions
-
build/integration/features/bootstrap/BasicStructure.php
-
build/integration/run.sh
|
|
|
@ -345,10 +345,22 @@ trait BasicStructure { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @BeforeScenario @local_storage |
|
|
|
*/ |
|
|
|
public static function removeFilesFromLocalStorageBefore(){ |
|
|
|
$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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @AfterScenario @local_storage |
|
|
|
*/ |
|
|
|
public static function removeFilesFromLocalStorage(){ |
|
|
|
public static function removeFilesFromLocalStorageAfter(){ |
|
|
|
$dir = "./local_storage/"; |
|
|
|
$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS); |
|
|
|
$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST); |
|
|
|
|
|
|
|
@ -36,6 +36,9 @@ 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 |
|
|
|
|
|
|
|
OUTPUT_CREATE_STORAGE=`../../occ files_external:create local_storage local null::null -c datadir=./build/integration/local_storage` |
|
|
|
|
|
|
|
ID_STORAGE=`echo $OUTPUT_CREATE_STORAGE | awk {'print $5'}` |
|
|
|
@ -50,6 +53,9 @@ kill $PHPPID_FED |
|
|
|
|
|
|
|
../../occ files_external:delete -y $ID_STORAGE |
|
|
|
|
|
|
|
#Disable external storage app |
|
|
|
../../occ app:disable files_external |
|
|
|
|
|
|
|
if [ -z $HIDE_OC_LOGS ]; then |
|
|
|
tail "../../data/nextcloud.log" |
|
|
|
fi |
|
|
|
|