From 5a44f83bbf162d359f4a7201c27fff9cf11713f8 Mon Sep 17 00:00:00 2001 From: saw-jan Date: Thu, 28 Jan 2021 11:14:56 +0545 Subject: [PATCH 1/3] restore test files removed in PR #1488 --- .../features/apiBasic/addUser.feature | 18 +++++++++++++ .../features/apiBasic/uploadFile.feature | 18 +++++++++++++ .../apiBasic/webDavPUTAuthInvalid.feature | 26 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 tests/acceptance/features/apiBasic/addUser.feature create mode 100644 tests/acceptance/features/apiBasic/uploadFile.feature create mode 100644 tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature diff --git a/tests/acceptance/features/apiBasic/addUser.feature b/tests/acceptance/features/apiBasic/addUser.feature new file mode 100644 index 000000000..935325269 --- /dev/null +++ b/tests/acceptance/features/apiBasic/addUser.feature @@ -0,0 +1,18 @@ +@api @provisioning_api-app-required @skipOnLDAP +Feature: add user + As an admin + I want to be able to add users + So that I can give people controlled individual access to resources on the ownCloud server + + Scenario Outline: admin creates a user + Given using OCS API version "" + And user "brand-new-user" has been deleted + When the administrator sends a user creation request for user "brand-new-user" password "%alt1%" using the provisioning API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And user "brand-new-user" should exist + And user "brand-new-user" should be able to access a skeleton file + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | \ No newline at end of file diff --git a/tests/acceptance/features/apiBasic/uploadFile.feature b/tests/acceptance/features/apiBasic/uploadFile.feature new file mode 100644 index 000000000..1cc63b89a --- /dev/null +++ b/tests/acceptance/features/apiBasic/uploadFile.feature @@ -0,0 +1,18 @@ +@api +Feature: upload file + As a user + I want to be able to upload files + So that I can store and share files between multiple client systems + + Scenario Outline: upload a file and check download content + Given using OCS API version "" + And user "Alice" has been created with default attributes and without skeleton files + And using DAV path + When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the WebDAV API + Then the content of file "/upload.txt" for user "Alice" should be "uploaded content" + Examples: + | ocs_api_version | dav_version | + | 1 | old | + | 1 | new | + | 2 | old | + | 2 | new | \ No newline at end of file diff --git a/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature b/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature new file mode 100644 index 000000000..79f0b3adb --- /dev/null +++ b/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature @@ -0,0 +1,26 @@ +@api +Feature: attempt to PUT files with invalid password + + Background: + Given user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has created folder "/PARENT" + + Scenario: send PUT requests to webDav endpoints as normal user with wrong password + When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "invalid" about user "Alice" + | endpoint | + | /remote.php/webdav/textfile0.txt | + | /remote.php/dav/files/%username%/textfile0.txt | + | /remote.php/webdav/PARENT | + | /remote.php/dav/files/%username%/PARENT | + | /remote.php/dav/files/%username%/PARENT/parent.txt | + Then the HTTP status code of responses on all endpoints should be "401" + + Scenario: send PUT requests to webDav endpoints as normal user with no password + When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "" about user "Alice" + | endpoint | + | /remote.php/webdav/textfile0.txt | + | /remote.php/dav/files/%username%/textfile0.txt | + | /remote.php/webdav/PARENT | + | /remote.php/dav/files/%username%/PARENT | + | /remote.php/dav/files/%username%/PARENT/parent.txt | + Then the HTTP status code of responses on all endpoints should be "401" From 924246c0a65142c67a89b28ac162c0310fc6ee07 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 28 Jan 2021 11:56:07 +0545 Subject: [PATCH 2/3] Rename apiBasic to apiAccountsHashDifficulty --- .drone.star | 4 ++-- tests/acceptance/config/behat.yml | 4 ++-- tests/acceptance/docker/Makefile | 16 +++++++------- .../apiAccountsHashDifficulty/addUser.feature | 21 +++++++++++++++++++ .../createShareToSharesFolder.feature | 6 ++++++ .../uploadFile.feature | 9 +++++--- .../webDavPUTAuthInvalid.feature | 6 ++++++ .../features/apiBasic/addUser.feature | 18 ---------------- 8 files changed, 51 insertions(+), 33 deletions(-) create mode 100644 tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature rename tests/acceptance/features/{apiBasic => apiAccountsHashDifficulty}/createShareToSharesFolder.feature (73%) rename tests/acceptance/features/{apiBasic => apiAccountsHashDifficulty}/uploadFile.feature (61%) rename tests/acceptance/features/{apiBasic => apiAccountsHashDifficulty}/webDavPUTAuthInvalid.feature (80%) delete mode 100644 tests/acceptance/features/apiBasic/addUser.feature diff --git a/.drone.star b/.drone.star index 76dcbeefc..2e599403e 100644 --- a/.drone.star +++ b/.drone.star @@ -239,8 +239,8 @@ def testPipelines(ctx): pipelines = [ localApiTests(ctx, 'owncloud', 'apiOcisSpecific'), localApiTests(ctx, 'ocis', 'apiOcisSpecific'), - localApiTests(ctx, 'owncloud', 'apiBasic', 'default'), - localApiTests(ctx, 'ocis', 'apiBasic', 'default') + localApiTests(ctx, 'owncloud', 'apiAccountsHashDifficulty', 'default'), + localApiTests(ctx, 'ocis', 'apiAccountsHashDifficulty', 'default') ] for runPart in range(1, config['apiTests']['numberOfParts'] + 1): diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index bb33b728d..e2480b6f2 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -3,9 +3,9 @@ default: '': '%paths.base%/../features/bootstrap' suites: - apiBasic: + apiAccountsHashDifficulty: paths: - - '%paths.base%/../features/apiBasic' + - '%paths.base%/../features/apiAccountsHashDifficulty' context: &common_ldap_suite_context parameters: ldapAdminPassword: admin diff --git a/tests/acceptance/docker/Makefile b/tests/acceptance/docker/Makefile index dcec4ed63..554c8c37f 100644 --- a/tests/acceptance/docker/Makefile +++ b/tests/acceptance/docker/Makefile @@ -51,11 +51,11 @@ help: @echo -e "https://hub.docker.com/r/owncloud/ocis." @echo @echo -e "${GREEN}Run full oCIS test suites against oCIS with oCIS storage:${RESET}\n" - @echo -e "\tmake localApiTests-apiBasic-ocis\t\t${BLUE}run apiBasic test suite${RESET}" + @echo -e "\tmake localApiTests-apiAccountsHashDifficulty-ocis\t\t${BLUE}run apiAccountsHashDifficulty test suite${RESET}" @echo -e "\tmake localApiTests-apiOcisSpecific-ocis\t\t${BLUE}run apiOcisSPecific test suite${RESET}" @echo @echo -e "${GREEN}Run full oCIS test suites against oCIS with ownCloud storage:${RESET}\n" - @echo -e "\tmake localApiTests-apiBasic-owncloud\t\t${BLUE}run apiBasic test suite${RESET}" + @echo -e "\tmake localApiTests-apiAccountsHashDifficulty-owncloud\t\t${BLUE}run apiAccountsHashDifficulty test suite${RESET}" @echo -e "\tmake localApiTests-apiOcisSpecific-owncloud\t${BLUE}run apiOcisSpecific test suite${RESET}" @echo @echo -e "${GREEN}Run full ownCloud test suites against oCIS with oCIS storage:${RESET}\n" @@ -133,11 +133,11 @@ localApiTests-apiOcisSpecific-owncloud: ## run apiOcisSpecific test suite with o BEHAT_SUITE=apiOcisSpecific \ $(MAKE) --no-print-directory testSuite -.PHONY: localApiTests-apiBasic-owncloud -localApiTests-apiBasic-owncloud: ## run apiBasic test suite with owncloud storage +.PHONY: localApiTests-apiAccountsHashDifficulty-owncloud +localApiTests-apiAccountsHashDifficulty-owncloud: ## run apiAccountsHashDifficulty test suite with owncloud storage @TEST_SOURCE=ocis \ STORAGE=owncloud \ - BEHAT_SUITE=apiBasic \ + BEHAT_SUITE=apiAccountsHashDifficulty \ $(MAKE) --no-print-directory testSuite .PHONY: localApiTests-apiOcisSpecific-ocis @@ -147,11 +147,11 @@ localApiTests-apiOcisSpecific-ocis: ## run apiOcisSPecific test suite with ocis BEHAT_SUITE=apiOcisSpecific \ $(MAKE) --no-print-directory testSuite -.PHONY: localApiTests-apiBasic-ocis -localApiTests-apiBasic-ocis: ## run apiBasic test suite with ocis storage +.PHONY: localApiTests-apiAccountsHashDifficulty-ocis +localApiTests-apiAccountsHashDifficulty-ocis: ## run apiAccountsHashDifficulty test suite with ocis storage @TEST_SOURCE=ocis \ STORAGE=ocis \ - BEHAT_SUITE=apiBasic \ + BEHAT_SUITE=apiAccountsHashDifficulty \ $(MAKE) --no-print-directory testSuite targets = $(addprefix Core-API-Tests-owncloud-storage-,$(PARTS)) diff --git a/tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature b/tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature new file mode 100644 index 000000000..eb271388b --- /dev/null +++ b/tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature @@ -0,0 +1,21 @@ +@api @provisioning_api-app-required @skipOnLDAP +Feature: add user + As an admin + I want to be able to add users and store their password with the full hash difficulty + So that I can give people controlled individual access to resources on the ownCloud server + + Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production + See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 + + Scenario Outline: admin creates a user + Given using OCS API version "" + And user "brand-new-user" has been deleted + When the administrator sends a user creation request for user "brand-new-user" password "%alt1%" using the provisioning API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And user "brand-new-user" should exist + And user "brand-new-user" should be able to access a skeleton file + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | diff --git a/tests/acceptance/features/apiBasic/createShareToSharesFolder.feature b/tests/acceptance/features/apiAccountsHashDifficulty/createShareToSharesFolder.feature similarity index 73% rename from tests/acceptance/features/apiBasic/createShareToSharesFolder.feature rename to tests/acceptance/features/apiAccountsHashDifficulty/createShareToSharesFolder.feature index b2b1af193..524e38b5a 100644 --- a/tests/acceptance/features/apiBasic/createShareToSharesFolder.feature +++ b/tests/acceptance/features/apiAccountsHashDifficulty/createShareToSharesFolder.feature @@ -1,5 +1,11 @@ @api @files_sharing-app-required Feature: sharing + As a user + I want to be able to share files when passwords are stored with the full hash difficulty + So that I can give people secure controlled access to my data + + Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production + See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 Scenario Outline: Creating a share of a file with a user Given the administrator has set the default folder for received shares to "Shares" diff --git a/tests/acceptance/features/apiBasic/uploadFile.feature b/tests/acceptance/features/apiAccountsHashDifficulty/uploadFile.feature similarity index 61% rename from tests/acceptance/features/apiBasic/uploadFile.feature rename to tests/acceptance/features/apiAccountsHashDifficulty/uploadFile.feature index 1cc63b89a..d0518fa92 100644 --- a/tests/acceptance/features/apiBasic/uploadFile.feature +++ b/tests/acceptance/features/apiAccountsHashDifficulty/uploadFile.feature @@ -1,8 +1,11 @@ @api Feature: upload file As a user - I want to be able to upload files - So that I can store and share files between multiple client systems + I want to be able to upload files when passwords are stored with the full hash difficulty + So that I can store and share files securely between multiple client systems + + Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production + See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 Scenario Outline: upload a file and check download content Given using OCS API version "" @@ -15,4 +18,4 @@ Feature: upload file | 1 | old | | 1 | new | | 2 | old | - | 2 | new | \ No newline at end of file + | 2 | new | diff --git a/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature b/tests/acceptance/features/apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature similarity index 80% rename from tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature rename to tests/acceptance/features/apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature index 79f0b3adb..37ba017d3 100644 --- a/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature +++ b/tests/acceptance/features/apiAccountsHashDifficulty/webDavPUTAuthInvalid.feature @@ -1,5 +1,11 @@ @api Feature: attempt to PUT files with invalid password + As an admin + I want to the system to be secure when passwords are stored with the full hash difficulty + So that unauthorised users do not have access to data + + Note - this feature is run in CI with ACCOUNTS_HASH_DIFFICULTY set to the default for production + See https://github.com/owncloud/ocis/issues/1542 and https://github.com/owncloud/ocis/pull/839 Background: Given user "Alice" has been created with default attributes and without skeleton files diff --git a/tests/acceptance/features/apiBasic/addUser.feature b/tests/acceptance/features/apiBasic/addUser.feature deleted file mode 100644 index 935325269..000000000 --- a/tests/acceptance/features/apiBasic/addUser.feature +++ /dev/null @@ -1,18 +0,0 @@ -@api @provisioning_api-app-required @skipOnLDAP -Feature: add user - As an admin - I want to be able to add users - So that I can give people controlled individual access to resources on the ownCloud server - - Scenario Outline: admin creates a user - Given using OCS API version "" - And user "brand-new-user" has been deleted - When the administrator sends a user creation request for user "brand-new-user" password "%alt1%" using the provisioning API - Then the OCS status code should be "" - And the HTTP status code should be "200" - And user "brand-new-user" should exist - And user "brand-new-user" should be able to access a skeleton file - Examples: - | ocs_api_version | ocs_status_code | - | 1 | 100 | - | 2 | 200 | \ No newline at end of file From dfb4eb11cbc39526b086b6fb657135c388742474 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 28 Jan 2021 12:03:01 +0545 Subject: [PATCH 3/3] Rename apiOcisSpecific to apiBugDemonstration --- .drone.star | 6 ++--- docs/ocis/development/testing.md | 8 +++---- tests/acceptance/config/behat.yml | 4 ++-- tests/acceptance/docker/Makefile | 24 +++++++++---------- .../apiAuthOcs-ocsDELETEAuth.feature | 0 .../apiAuthOcs-ocsGETAuth.feature | 0 .../apiAuthOcs-ocsPOSTAuth.feature | 0 .../apiAuthOcs-ocsPUTAuth.feature | 0 .../apiAuthWebDav-webDavLOCKAuth.feature | 0 .../apiAuthWebDav-webDavMOVEAuth.feature | 0 ...ilities-capabilitiesWithNormalUser.feature | 0 .../apiMain-main.feature | 0 ...-createShareWithInvalidPermissions.feature | 0 ...piShareManagementBasic-createShare.feature | 0 .../apiShareOperations-gettingShares.feature | 0 ...harePublicLink2-copyFromPublicLink.feature | 0 .../apiShareUpdate-updateShare.feature | 0 .../apiTrashbin-trashbinDelete.feature | 0 .../apiVersions-fileVersions.feature | 0 .../apiWebdavMove1-moveFolder.feature | 0 ...vMove1-moveFolderToBlacklistedName.feature | 0 .../apiWebdavMove2-moveFile.feature | 0 ...davMove2-moveFileToBlacklistedName.feature | 0 .../apiWebdavOperations-refuseAccess.feature | 0 .../apiWebdavPreviews-previews.feature | 0 .../apiWebdavProperties1-createFolder.feature | 0 ...ebdavProperties2-getFileProperties.feature | 0 .../apiWebdavUpload1-uploadFile.feature | 0 .../apiWebdavUploadTUS-optionsRequest.feature | 0 .../apiWebdavUploadTUS-uploadFile.feature | 0 30 files changed, 21 insertions(+), 21 deletions(-) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiAuthOcs-ocsDELETEAuth.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiAuthOcs-ocsGETAuth.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiAuthOcs-ocsPOSTAuth.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiAuthOcs-ocsPUTAuth.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiAuthWebDav-webDavLOCKAuth.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiAuthWebDav-webDavMOVEAuth.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiCapabilities-capabilitiesWithNormalUser.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiMain-main.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiShareManagementBasic-createShare.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiShareOperations-gettingShares.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiSharePublicLink2-copyFromPublicLink.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiShareUpdate-updateShare.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiTrashbin-trashbinDelete.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiVersions-fileVersions.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavMove1-moveFolder.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavMove1-moveFolderToBlacklistedName.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavMove2-moveFile.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavMove2-moveFileToBlacklistedName.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavOperations-refuseAccess.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavPreviews-previews.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavProperties1-createFolder.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavProperties2-getFileProperties.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavUpload1-uploadFile.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavUploadTUS-optionsRequest.feature (100%) rename tests/acceptance/features/{apiOcisSpecific => apiBugDemonstration}/apiWebdavUploadTUS-uploadFile.feature (100%) diff --git a/.drone.star b/.drone.star index 2e599403e..dac646de7 100644 --- a/.drone.star +++ b/.drone.star @@ -237,8 +237,8 @@ def testOcisModules(ctx): def testPipelines(ctx): pipelines = [ - localApiTests(ctx, 'owncloud', 'apiOcisSpecific'), - localApiTests(ctx, 'ocis', 'apiOcisSpecific'), + localApiTests(ctx, 'owncloud', 'apiBugDemonstration'), + localApiTests(ctx, 'ocis', 'apiBugDemonstration'), localApiTests(ctx, 'owncloud', 'apiAccountsHashDifficulty', 'default'), localApiTests(ctx, 'ocis', 'apiAccountsHashDifficulty', 'default') ] @@ -430,7 +430,7 @@ def uploadCoverage(ctx): }, } -def localApiTests(ctx, storage = 'owncloud', suite = 'apiOcisSpecific', accounts_hash_difficulty = 4): +def localApiTests(ctx, storage = 'owncloud', suite = 'apiBugDemonstration', accounts_hash_difficulty = 4): return { 'kind': 'pipeline', 'type': 'docker', diff --git a/docs/ocis/development/testing.md b/docs/ocis/development/testing.md index 318c0a656..9e5b674c5 100644 --- a/docs/ocis/development/testing.md +++ b/docs/ocis/development/testing.md @@ -39,7 +39,7 @@ You can invoke two types of test suite runs: The names of the full test suite make targets have the same naming as in the CI pipeline. -For example `make -C tests/acceptance/docker localApiTests-apiOcisSpecific-ocis` runs the same tests as the `localApiTests-apiOcisSpecific-ocis` CI pipeline, which runs the oCIS test suite "apiOcisSpecific" against an oCIS with oCIS storage. +For example `make -C tests/acceptance/docker localApiTests-apiBugDemonstration-ocis` runs the same tests as the `localApiTests-apiBugDemonstration-ocis` CI pipeline, which runs the oCIS test suite "apiBugDemonstration" against an oCIS with oCIS storage. For example `make -C tests/acceptance/docker Core-API-Tests-owncloud-storage-3`runs the same tests as the `Core-API-Tests-owncloud-storage-3` CI pipeline, which runs the third (out of ten) ownCloud test suite against an oCIS with owncloud storage. @@ -48,7 +48,7 @@ For example `make -C tests/acceptance/docker Core-API-Tests-owncloud-storage-3`r The single feature tests can also be run against the different storage backends. Therefore multiple make targets with the schema test--feature- exists. For selecting a single feature test you have to add an additional `BEHAT_FEATURE=...` parameter when invoking the make command: ``` -make -C tests/acceptance/docker test-ocis-feature-ocis BEHAT_FEATURE='tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature' +make -C tests/acceptance/docker test-ocis-feature-ocis BEHAT_FEATURE='tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsDELETEAuth.feature' ``` This must be pointing to a valid feature definition. @@ -58,7 +58,7 @@ This must be pointing to a valid feature definition. By default the tests will be run against docker image built from your current working state of the oCIS repository. For some purposes it might also be handy to use a oCIS image from Docker Hub. Therefore you can provide the optional flag `OCIS_IMAGE_TAG=...` which must contain an available docker tag of the [owncloud/ocis registry on Docker Hub](https://hub.docker.com/r/owncloud/ocis) (eg. 'latest'). ``` -make -C tests/acceptance/docker localApiTests-apiOcisSpecific-ocis OCIS_IMAGE_TAG=latest +make -C tests/acceptance/docker localApiTests-apiBugDemonstration-ocis OCIS_IMAGE_TAG=latest ``` ### Test log output @@ -138,7 +138,7 @@ Those scenarios are run in the ordinary acceptance test pipeline in CI. The scen expected failures. If there are any differences then the CI pipeline fails. Similarly, scenarios that do not work in oCIS with EOS storage are listed in `tests/acceptance/expected-failures-on-EOS-storage.txt`. Additionally, some issues have scenarios that demonstrate the current buggy behaviour in ocis(reva). -Those scenarios are in this ocis repository in `tests/acceptance/features/apiOcisSpecific`. +Those scenarios are in this ocis repository in `tests/acceptance/features/apiBugDemonstration`. Have a look into the [documentation](https://doc.owncloud.com/server/developer_manual/testing/acceptance-tests.html#writing-scenarios-for-bugs) to understand why we are writing those tests. If you want to work on a specific issue diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index e2480b6f2..f78597273 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -29,9 +29,9 @@ default: - TrashbinContext: - WebDavPropertiesContext: - apiOcisSpecific: + apiBugDemonstration: paths: - - '%paths.base%/../features/apiOcisSpecific' + - '%paths.base%/../features/apiBugDemonstration' context: *common_ldap_suite_context contexts: - RevaContext: diff --git a/tests/acceptance/docker/Makefile b/tests/acceptance/docker/Makefile index 554c8c37f..a1f0d4a26 100644 --- a/tests/acceptance/docker/Makefile +++ b/tests/acceptance/docker/Makefile @@ -52,11 +52,11 @@ help: @echo @echo -e "${GREEN}Run full oCIS test suites against oCIS with oCIS storage:${RESET}\n" @echo -e "\tmake localApiTests-apiAccountsHashDifficulty-ocis\t\t${BLUE}run apiAccountsHashDifficulty test suite${RESET}" - @echo -e "\tmake localApiTests-apiOcisSpecific-ocis\t\t${BLUE}run apiOcisSPecific test suite${RESET}" + @echo -e "\tmake localApiTests-apiBugDemonstration-ocis\t\t${BLUE}run apiBugDemonstration test suite${RESET}" @echo @echo -e "${GREEN}Run full oCIS test suites against oCIS with ownCloud storage:${RESET}\n" @echo -e "\tmake localApiTests-apiAccountsHashDifficulty-owncloud\t\t${BLUE}run apiAccountsHashDifficulty test suite${RESET}" - @echo -e "\tmake localApiTests-apiOcisSpecific-owncloud\t${BLUE}run apiOcisSpecific test suite${RESET}" + @echo -e "\tmake localApiTests-apiBugDemonstration-owncloud\t${BLUE}run apiBugDemonstration test suite${RESET}" @echo @echo -e "${GREEN}Run full ownCloud test suites against oCIS with oCIS storage:${RESET}\n" @echo -e "\tmake Core-API-Tests-ocis-storage-${RED}X${RESET}\t\t${BLUE}run test suite number X, where ${RED}X = 1 .. 10${RESET}" @@ -68,13 +68,13 @@ help: @echo -e "\tmake test-ocis-feature-ocis-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}" @echo @echo -e "\twhere ${YELLOW}BEHAT_FEATURE='...'${RESET} contains a relative path to the feature definition." - @echo -e "\texample: ${RED}tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature${RESET}" + @echo -e "\texample: ${RED}tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsDELETEAuth.feature${RESET}" @echo @echo -e "${GREEN}Run an oCIS feature test against oCIS with owncloud storage:${RESET}\n" @echo -e "\tmake test-ocis-feature-owncloud-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}" @echo @echo -e "\twhere ${YELLOW}BEHAT_FEATURE='...'${RESET} contains a relative path to the feature definition." - @echo -e "\texample: ${RED}tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature${RESET}" + @echo -e "\texample: ${RED}tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsDELETEAuth.feature${RESET}" @echo @echo -e "${GREEN}Run an ownCloud feature test against oCIS with oCIS storage:${RESET}\n" @echo -e "\tmake test-oc10-feature-ocis-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}" @@ -99,14 +99,14 @@ help: @echo -e "\tmake clean-docker-volumes\t\t${BLUE}removes used docker volumes (used for caching)${RESET}" @echo .PHONY: test-ocis-feature-ocis-storage -test-ocis-feature-ocis-storage: ## test a ocis feature with oCIS storage, useage: make ... BEHAT_FEATURE='tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature:7' +test-ocis-feature-ocis-storage: ## test a ocis feature with oCIS storage, useage: make ... BEHAT_FEATURE='tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsDELETEAuth.feature:7' @TEST_SOURCE=ocis \ STORAGE=ocis \ BEHAT_FEATURE=$(BEHAT_FEATURE) \ $(MAKE) --no-print-directory testSuite .PHONY: test-ocis-feature-owncloud-storage -test-ocis-feature-owncloud-storage: ## test a ocis feature with oc10 storage, useage: make ... BEHAT_FEATURE='tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature:7' +test-ocis-feature-owncloud-storage: ## test a ocis feature with oc10 storage, useage: make ... BEHAT_FEATURE='tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsDELETEAuth.feature:7' @TEST_SOURCE=ocis \ STORAGE=owncloud \ BEHAT_FEATURE=$(BEHAT_FEATURE) \ @@ -126,11 +126,11 @@ test-oc10-feature-owncloud-storage: ## test a oC10 feature with oc10 storage, us BEHAT_FEATURE=$(BEHAT_FEATURE) \ $(MAKE) --no-print-directory testSuite -.PHONY: localApiTests-apiOcisSpecific-owncloud -localApiTests-apiOcisSpecific-owncloud: ## run apiOcisSpecific test suite with owncloud storage +.PHONY: localApiTests-apiBugDemonstration-owncloud +localApiTests-apiBugDemonstration-owncloud: ## run apiBugDemonstration test suite with owncloud storage @TEST_SOURCE=oc10 \ STORAGE=owncloud \ - BEHAT_SUITE=apiOcisSpecific \ + BEHAT_SUITE=apiBugDemonstration \ $(MAKE) --no-print-directory testSuite .PHONY: localApiTests-apiAccountsHashDifficulty-owncloud @@ -140,11 +140,11 @@ localApiTests-apiAccountsHashDifficulty-owncloud: ## run apiAccountsHashDifficul BEHAT_SUITE=apiAccountsHashDifficulty \ $(MAKE) --no-print-directory testSuite -.PHONY: localApiTests-apiOcisSpecific-ocis -localApiTests-apiOcisSpecific-ocis: ## run apiOcisSPecific test suite with ocis storage +.PHONY: localApiTests-apiBugDemonstration-ocis +localApiTests-apiBugDemonstration-ocis: ## run apiBugDemonstration test suite with ocis storage @TEST_SOURCE=ocis \ STORAGE=ocis \ - BEHAT_SUITE=apiOcisSpecific \ + BEHAT_SUITE=apiBugDemonstration \ $(MAKE) --no-print-directory testSuite .PHONY: localApiTests-apiAccountsHashDifficulty-ocis diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature b/tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsDELETEAuth.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsDELETEAuth.feature rename to tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsDELETEAuth.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature b/tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsGETAuth.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsGETAuth.feature rename to tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsGETAuth.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature b/tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsPOSTAuth.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPOSTAuth.feature rename to tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsPOSTAuth.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPUTAuth.feature b/tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsPUTAuth.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiAuthOcs-ocsPUTAuth.feature rename to tests/acceptance/features/apiBugDemonstration/apiAuthOcs-ocsPUTAuth.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavLOCKAuth.feature b/tests/acceptance/features/apiBugDemonstration/apiAuthWebDav-webDavLOCKAuth.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavLOCKAuth.feature rename to tests/acceptance/features/apiBugDemonstration/apiAuthWebDav-webDavLOCKAuth.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavMOVEAuth.feature b/tests/acceptance/features/apiBugDemonstration/apiAuthWebDav-webDavMOVEAuth.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiAuthWebDav-webDavMOVEAuth.feature rename to tests/acceptance/features/apiBugDemonstration/apiAuthWebDav-webDavMOVEAuth.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiCapabilities-capabilitiesWithNormalUser.feature b/tests/acceptance/features/apiBugDemonstration/apiCapabilities-capabilitiesWithNormalUser.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiCapabilities-capabilitiesWithNormalUser.feature rename to tests/acceptance/features/apiBugDemonstration/apiCapabilities-capabilitiesWithNormalUser.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiMain-main.feature b/tests/acceptance/features/apiBugDemonstration/apiMain-main.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiMain-main.feature rename to tests/acceptance/features/apiBugDemonstration/apiMain-main.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature b/tests/acceptance/features/apiBugDemonstration/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature rename to tests/acceptance/features/apiBugDemonstration/apiShareCreateSpecial2-createShareWithInvalidPermissions.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-createShare.feature b/tests/acceptance/features/apiBugDemonstration/apiShareManagementBasic-createShare.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiShareManagementBasic-createShare.feature rename to tests/acceptance/features/apiBugDemonstration/apiShareManagementBasic-createShare.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature b/tests/acceptance/features/apiBugDemonstration/apiShareOperations-gettingShares.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiShareOperations-gettingShares.feature rename to tests/acceptance/features/apiBugDemonstration/apiShareOperations-gettingShares.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-copyFromPublicLink.feature b/tests/acceptance/features/apiBugDemonstration/apiSharePublicLink2-copyFromPublicLink.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiSharePublicLink2-copyFromPublicLink.feature rename to tests/acceptance/features/apiBugDemonstration/apiSharePublicLink2-copyFromPublicLink.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature b/tests/acceptance/features/apiBugDemonstration/apiShareUpdate-updateShare.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiShareUpdate-updateShare.feature rename to tests/acceptance/features/apiBugDemonstration/apiShareUpdate-updateShare.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature b/tests/acceptance/features/apiBugDemonstration/apiTrashbin-trashbinDelete.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiTrashbin-trashbinDelete.feature rename to tests/acceptance/features/apiBugDemonstration/apiTrashbin-trashbinDelete.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiVersions-fileVersions.feature b/tests/acceptance/features/apiBugDemonstration/apiVersions-fileVersions.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiVersions-fileVersions.feature rename to tests/acceptance/features/apiBugDemonstration/apiVersions-fileVersions.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavMove1-moveFolder.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolder.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavMove1-moveFolder.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolderToBlacklistedName.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavMove1-moveFolderToBlacklistedName.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavMove1-moveFolderToBlacklistedName.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavMove1-moveFolderToBlacklistedName.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavMove2-moveFile.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFile.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavMove2-moveFile.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavMove2-moveFileToBlacklistedName.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavMove2-moveFileToBlacklistedName.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavMove2-moveFileToBlacklistedName.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-refuseAccess.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavOperations-refuseAccess.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavOperations-refuseAccess.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavOperations-refuseAccess.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavPreviews-previews.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavPreviews-previews.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavPreviews-previews.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavPreviews-previews.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-createFolder.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavProperties1-createFolder.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavProperties1-createFolder.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavProperties1-createFolder.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavProperties2-getFileProperties.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavProperties2-getFileProperties.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavProperties2-getFileProperties.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavProperties2-getFileProperties.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavUpload1-uploadFile.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavUpload1-uploadFile.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavUpload1-uploadFile.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavUpload1-uploadFile.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavUploadTUS-optionsRequest.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavUploadTUS-optionsRequest.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavUploadTUS-optionsRequest.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavUploadTUS-optionsRequest.feature diff --git a/tests/acceptance/features/apiOcisSpecific/apiWebdavUploadTUS-uploadFile.feature b/tests/acceptance/features/apiBugDemonstration/apiWebdavUploadTUS-uploadFile.feature similarity index 100% rename from tests/acceptance/features/apiOcisSpecific/apiWebdavUploadTUS-uploadFile.feature rename to tests/acceptance/features/apiBugDemonstration/apiWebdavUploadTUS-uploadFile.feature