From c39bd10f1b2a07ed021cb54e6ca2e6740c46ccb9 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Fri, 28 Jun 2024 17:46:07 +0545 Subject: [PATCH] test: wait and check for sync status before action --- tests/acceptance/expected-failures-API-on-OCIS-storage.md | 4 ++-- .../features/coreApiWebdavMove2/moveShareOnOcis.feature | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index beac6a1f9..04e457b20 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -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: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) -- [coreApiWebdavMove2/moveShareOnOcis.feature:296](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L296) -- [coreApiWebdavMove2/moveShareOnOcis.feature:299](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L299) +- [coreApiWebdavMove2/moveShareOnOcis.feature:303](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L303) +- [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. The bash script that processes this file requires that the last line has a newline on the end. diff --git a/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature b/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature index 22a437a0b..b8de19c7e 100644 --- a/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature +++ b/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature @@ -45,6 +45,7 @@ Feature: move (rename) file | sharee | Alice | | shareType | user | | permissionsRole | | + And user "Alice" has a share "testshare" synced 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 Then the HTTP status code should be "502" @@ -98,6 +99,7 @@ Feature: move (rename) file | sharee | Alice | | shareType | user | | permissionsRole | | + And user "Alice" has a share "testshare" synced When user "Alice" moves file "/Shares/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API Then the HTTP status code should be "502" And as "Alice" file "/Shares/testshare/testfile.txt" should exist @@ -149,6 +151,7 @@ Feature: move (rename) file | sharee | Alice | | shareType | user | | permissionsRole | | + And user "Alice" has a share "testshare" synced And user "Alice" has created folder "/testsubfolder" 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 @@ -209,6 +212,7 @@ Feature: move (rename) file | sharee | Alice | | shareType | user | | permissionsRole | | + And user "Alice" has a share "testshare" synced When user "Alice" moves folder "/Shares/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API Then the HTTP status code should be "502" And as "Alice" folder "/Shares/testshare/testsubfolder" should exist @@ -235,6 +239,7 @@ Feature: move (rename) file | sharee | Alice | | shareType | user | | permissionsRole | | + 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 Then the HTTP status code should be "201" And as "Alice" file "/Shares/testshare/child/testfile.txt" should exist @@ -261,6 +266,7 @@ Feature: move (rename) file | sharee | Alice | | shareType | user | | 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 Then the HTTP status code should be "403" And as "Alice" file "/Shares/testshare/child/testfile.txt" should not exist @@ -284,6 +290,7 @@ Feature: move (rename) file | sharee | Alice | | shareType | user | | permissionsRole | | + 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 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