test: wait and check for sync status before action

This commit is contained in:
Saw-jan
2024-06-28 18:07:58 +05:45
parent eb5a9ceade
commit c39bd10f1b
2 changed files with 9 additions and 2 deletions
@@ -249,8 +249,8 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [coreApiWebdavMove1/moveFolder.feature:253](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L253) - [coreApiWebdavMove1/moveFolder.feature:253](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L253)
- [coreApiWebdavMove1/moveFolder.feature:254](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L254) - [coreApiWebdavMove1/moveFolder.feature:254](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L254)
- [coreApiWebdavMove1/moveFolder.feature:259](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L259) - [coreApiWebdavMove1/moveFolder.feature:259](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L259)
- [coreApiWebdavMove2/moveShareOnOcis.feature:296](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L296) - [coreApiWebdavMove2/moveShareOnOcis.feature:303](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L303)
- [coreApiWebdavMove2/moveShareOnOcis.feature:299](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L299) - [coreApiWebdavMove2/moveShareOnOcis.feature:306](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L306)
Note: always have an empty line at the end of this file. Note: always have an empty line at the end of this file.
The bash script that processes this file requires that the last line has a newline on the end. The bash script that processes this file requires that the last line has a newline on the end.
@@ -45,6 +45,7 @@ Feature: move (rename) file
| sharee | Alice | | sharee | Alice |
| shareType | user | | shareType | user |
| permissionsRole | <permissions-role> | | permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
And user "Alice" has uploaded file with content "test data" to "/testfile.txt" And user "Alice" has uploaded file with content "test data" to "/testfile.txt"
When user "Alice" moves file "/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API When user "Alice" moves file "/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API
Then the HTTP status code should be "502" Then the HTTP status code should be "502"
@@ -98,6 +99,7 @@ Feature: move (rename) file
| sharee | Alice | | sharee | Alice |
| shareType | user | | shareType | user |
| permissionsRole | <permissions-role> | | permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
When user "Alice" moves file "/Shares/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API When user "Alice" moves file "/Shares/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API
Then the HTTP status code should be "502" Then the HTTP status code should be "502"
And as "Alice" file "/Shares/testshare/testfile.txt" should exist And as "Alice" file "/Shares/testshare/testfile.txt" should exist
@@ -149,6 +151,7 @@ Feature: move (rename) file
| sharee | Alice | | sharee | Alice |
| shareType | user | | shareType | user |
| permissionsRole | <permissions-role> | | permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
And user "Alice" has created folder "/testsubfolder" And user "Alice" has created folder "/testsubfolder"
And user "Alice" has uploaded file with content "test data" to "/testsubfolder/testfile.txt" And user "Alice" has uploaded file with content "test data" to "/testsubfolder/testfile.txt"
When user "Alice" moves folder "/testsubfolder" to "Shares/testshare/testsubfolder" using the WebDAV API When user "Alice" moves folder "/testsubfolder" to "Shares/testshare/testsubfolder" using the WebDAV API
@@ -209,6 +212,7 @@ Feature: move (rename) file
| sharee | Alice | | sharee | Alice |
| shareType | user | | shareType | user |
| permissionsRole | <permissions-role> | | permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
When user "Alice" moves folder "/Shares/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API When user "Alice" moves folder "/Shares/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API
Then the HTTP status code should be "502" Then the HTTP status code should be "502"
And as "Alice" folder "/Shares/testshare/testsubfolder" should exist And as "Alice" folder "/Shares/testshare/testsubfolder" should exist
@@ -235,6 +239,7 @@ Feature: move (rename) file
| sharee | Alice | | sharee | Alice |
| shareType | user | | shareType | user |
| permissionsRole | <permissions-role> | | permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API
Then the HTTP status code should be "201" Then the HTTP status code should be "201"
And as "Alice" file "/Shares/testshare/child/testfile.txt" should exist And as "Alice" file "/Shares/testshare/child/testfile.txt" should exist
@@ -261,6 +266,7 @@ Feature: move (rename) file
| sharee | Alice | | sharee | Alice |
| shareType | user | | shareType | user |
| permissionsRole | Viewer | | permissionsRole | Viewer |
And user "Alice" has a share "testshare" synced
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API
Then the HTTP status code should be "403" Then the HTTP status code should be "403"
And as "Alice" file "/Shares/testshare/child/testfile.txt" should not exist And as "Alice" file "/Shares/testshare/child/testfile.txt" should not exist
@@ -284,6 +290,7 @@ Feature: move (rename) file
| sharee | Alice | | sharee | Alice |
| shareType | user | | shareType | user |
| permissionsRole | <permissions-role> | | permissionsRole | <permissions-role> |
And user "Alice" has a share "testshare" synced
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API
Then the HTTP status code should be "403" Then the HTTP status code should be "403"
And as "Brian" the file with original path "testshare/testfile.txt" should not exist in the trashbin And as "Brian" the file with original path "testshare/testfile.txt" should not exist in the trashbin