aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-03-22 18:00:12 +0100
committerRobin Appelman <robin@icewind.nl>2017-03-22 18:00:12 +0100
commit1e707ef1db10f3d399099ee4ab1ef10f0531eac5 (patch)
tree39999e8ffaec25e807085dd467dffdee33f21dd6
parent714f198a5ddf66a813c82d77f400f27d7deebe51 (diff)
downloadnextcloud-server-1e707ef1db10f3d399099ee4ab1ef10f0531eac5.tar.gz
nextcloud-server-1e707ef1db10f3d399099ee4ab1ef10f0531eac5.zip
add integration test to ensure that shares dont overwrite external storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--build/integration/features/external-storage.feature18
-rwxr-xr-xbuild/integration/run.sh2
2 files changed, 18 insertions, 2 deletions
diff --git a/build/integration/features/external-storage.feature b/build/integration/features/external-storage.feature
index 7fbdf828fb8..da085d9e983 100644
--- a/build/integration/features/external-storage.feature
+++ b/build/integration/features/external-storage.feature
@@ -23,4 +23,20 @@ Feature: external-storage
| token | A_TOKEN |
| mimetype | httpd/unix-directory |
-
+ @local_storage
+ Scenario: Shares dont overwrite external storages
+ Given user "user0" exists
+ And user "user1" exists
+ And As an "user0"
+ And User "user0" moved file "/textfile0.txt" to "/local_storage/textfile0.txt"
+ And invoking occ with "files_external:create --user user0 test local null::null -c datadir=./build/integration/work/local_storage"
+ And invoking occ with "files:scan --path /user0/files/test"
+ And as "user0" the file "/local_storage/textfile0.txt" exists
+ And as "user0" the folder "/test" exists
+ And as "user0" the file "/test/textfile0.txt" exists
+ And As an "user1"
+ And user "user1" created a folder "/test"
+ And User "user1" moved file "/textfile0.txt" to "/test/textfile1.txt"
+ And folder "/test" of user "user1" is shared with user "user0"
+ And As an "user0"
+ Then as "user0" the file "/test/textfile1.txt" does not exist
diff --git a/build/integration/run.sh b/build/integration/run.sh
index 83600d8323e..f423c3e6fb7 100755
--- a/build/integration/run.sh
+++ b/build/integration/run.sh
@@ -46,7 +46,7 @@ if [ "$INSTALLED" == "true" ]; then
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'}`
+ ID_STORAGE=`echo $OUTPUT_CREATE_STORAGE | tr ' ' '\n' | tail -n1`
$OCC files_external:option $ID_STORAGE enable_sharing true