From 622981ca208b0eacdd94a0b72eef36a98fbf2524 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 12 Sep 2020 20:45:14 +0545 Subject: [PATCH] Do not use skeleton files in local API tests --- .../apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature | 4 ++-- .../apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature | 2 +- .../apiShareManagementBasic-deleteShare.feature | 3 ++- .../apiShareOperations-accessToShare.feature | 6 +++++- .../apiShareOperations-gettingShares.feature | 13 +++++++------ ...piSharePublicLink1-createPublicLinkShare.feature | 2 +- ...piSharePublicLink2-updatePublicLinkShare.feature | 3 ++- ...SharePublicLink2-uploadToPublicLinkShare.feature | 3 ++- .../apiShareUpdate-updateShare.feature | 2 +- .../apiOcisSpecific/apiWebdavMove2-moveFile.feature | 3 ++- ...apiWebdavMove2-moveFileToBlacklistedName.feature | 3 ++- 11 files changed, 27 insertions(+), 17 deletions(-) diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature b/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature index b153f6faff..8f3081a753 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature @@ -2,7 +2,7 @@ Feature: auth Background: - Given user "Alice" has been created with default attributes and skeleton files + Given user "Alice" has been created with default attributes and without skeleton files @issue-ocis-reva-29 @issue-ocis-reva-30 @@ -179,7 +179,7 @@ Feature: auth @smokeTest # after fixing all issues delete this Scenario and use the one from oC10 core Scenario: using OCS as normal user (username does not have a capital letter) with wrong password - Given user "brian" has been created with default attributes and skeleton files + Given user "brian" has been created with default attributes and without skeleton files When user "brian" requests these endpoints with "GET" using password "invalid" | endpoint | | /ocs/v1.php/cloud/users | diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature b/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature index fd3b344362..661fdbd53d 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature @@ -2,7 +2,7 @@ Feature: auth Background: - Given user "Alice" has been created with default attributes and skeleton files + Given user "Alice" has been created with default attributes and without skeleton files @issue-ocis-ocs-26 @issue-ocis-reva-30 # after fixing all issues delete this Scenario and use the one from oC10 core diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature b/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature index 3de47db441..ae52760ff6 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-deleteShare.feature @@ -4,7 +4,8 @@ Feature: sharing @issue-ocis-reva-356 # after fixing all issues delete this Scenario and use the one from oC10 core Scenario Outline: delete a share - Given user "Alice" has been created with default attributes and skeleton files + Given user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" And user "Brian" has been created with default attributes and without skeleton files And using OCS API version "" And user "Alice" has shared file "textfile0.txt" with user "Brian" diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature b/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature index afcc2da740..ebe86a43f9 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiShareOperations-accessToShare.feature @@ -2,10 +2,14 @@ Feature: sharing Background: - Given these users have been created with default attributes and skeleton files: + Given these users have been created with default attributes and without skeleton files: | username | | Alice | | Brian | + And user "Alice" has uploaded file with content "ownCloud test text file 0 Alice" to "/textfile0.txt" + And user "Alice" has uploaded file with content "ownCloud test text file 1 Alice" to "/textfile1.txt" + And user "Brian" has uploaded file with content "ownCloud test text file 0 Brian" to "/textfile0.txt" + And user "Brian" has uploaded file with content "ownCloud test text file 1 Brian" to "/textfile1.txt" @issue-ocis-reva-260 # after fixing all issues delete this Scenario and use the one from oC10 core diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature b/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature index 2007a366a5..4a35971b46 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature @@ -2,15 +2,14 @@ Feature: sharing Background: - Given these users have been created with default attributes and skeleton files: - | username | - | Alice | - | Brian | + Given user "Alice" has been created with default attributes and without skeleton files + And user "Brian" has been created with default attributes and without skeleton files @issue-ocis-reva-374 # after fixing all issues delete this Scenario and use the one from oC10 core Scenario Outline: Get a share with a user that didn't receive the share - Given using OCS API version "" + Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt" + And using OCS API version "" And user "Carol" has been created with default attributes and without skeleton files And user "Alice" has shared file "textfile0.txt" with user "Brian" When user "Carol" gets the info of the last share using the sharing API @@ -25,7 +24,9 @@ Feature: sharing @issue-ocis-reva-372 # after fixing all issues delete this Scenario and use the one from oC10 core Scenario Outline: getting all the shares inside the folder - Given using OCS API version "" + Given user "Alice" has created folder "/PARENT" + And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt" + And using OCS API version "" And user "Alice" has shared file "PARENT/parent.txt" with user "Brian" When user "Alice" gets all the shares inside the folder "PARENT/parent.txt" using the sharing API Then the OCS status code should be "" diff --git a/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature b/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature index 227bbce627..ad3848bf44 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink1-createPublicLinkShare.feature @@ -3,7 +3,7 @@ Feature: create a public link share Background: - Given user "Alice" has been created with default attributes and skeleton files + Given user "Alice" has been created with default attributes and without skeleton files @issue-37605 @skipOnOcis-OCIS-Storage # after fixing all issues make the oC10 scenario like this one, and delete this scenario diff --git a/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature b/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature index e14ed5e6af..fcba331e47 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-updatePublicLinkShare.feature @@ -3,7 +3,8 @@ Feature: update a public link share Background: Given using OCS API version "1" - And user "Alice" has been created with default attributes and skeleton files + And user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has created folder "/FOLDER" @issue-ocis-reva-243 @issue-ocis-reva-349 @issue-37653 # after fixing all issues delete this Scenario and use the one from oC10 core diff --git a/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature b/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature index 320ce525b6..9e00ee8131 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-uploadToPublicLinkShare.feature @@ -3,7 +3,8 @@ Feature: upload to a public link share Background: - Given user "Alice" has been created with default attributes and skeleton files + Given user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has created folder "/FOLDER" @issue-ocis-reva-290 # after fixing all issues delete this Scenario and use the one from oC10 core diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature b/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature index ce0aecd17e..33b9cfc404 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature @@ -3,7 +3,7 @@ Feature: sharing Background: Given using OCS API version "1" - And user "Alice" has been created with default attributes and skeleton files + And user "Alice" has been created with default attributes and without skeleton files @skipOnOcis-EOS-Storage @toFixOnOCIS @issue-ocis-reva-243 @skipOnOcis-OCIS-Storage # after fixing all issues delete this Scenario and use the one from oC10 core diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature b/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature index 9ea72a8935..10eea11ec1 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature @@ -6,7 +6,8 @@ Feature: move (rename) file Background: Given using OCS API version "1" - And user "Alice" has been created with default attributes and skeleton files + And user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "some welcome data" to "/welcome.txt" @issue-ocis-reva-211 @skipOnOcis-OCIS-Storage # after fixing all issues delete this Scenario and use the one from oC10 core diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature b/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature index 9f82828cff..00b4763bea 100644 --- a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature +++ b/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature @@ -6,7 +6,8 @@ Feature: users cannot move (rename) a file to a blacklisted name Background: Given using OCS API version "1" - And user "Alice" has been created with default attributes and skeleton files + And user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "some welcome data" to "/welcome.txt" @issue-ocis-reva-211 @skipOnOcis-OCIS-Storage # after fixing all issues delete this Scenario and use the one from oC10 core