From 89a36d1e63162ffb7d8292938da2163281ac2da9 Mon Sep 17 00:00:00 2001 From: Niraj Acharya Date: Mon, 26 Aug 2024 12:12:56 +0545 Subject: [PATCH] :wq removing `test-acceptance-from-core-api` and merging core and api behat config files to use single command to run api tests --- .drone.star | 36 ++- Makefile | 6 - tests/acceptance/config/behat-core.yml | 334 ------------------------- tests/acceptance/config/behat.yml | 326 ++++++++++++++++++++++++ 4 files changed, 360 insertions(+), 342 deletions(-) delete mode 100644 tests/acceptance/config/behat-core.yml diff --git a/.drone.star b/.drone.star index 6755c99df28..e12f97af90b 100644 --- a/.drone.star +++ b/.drone.star @@ -176,9 +176,40 @@ config = { }, }, "apiTests": { - "numberOfParts": 10, + "numberOfParts": 28, "skip": False, "skipExceptParts": [], + "suites": [ + "coreApiMain", + "coreApiAuth", + "coreApiCapabilities", + "coreApiFavorites", + "coreApiShareCreateSpecialToShares1", + "coreApiShareCreateSpecialToShares2", + "coreApiSharees", + "coreApiShareManagementToShares", + "coreApiShareManagementBasicToShares", + "coreApiShareOperationsToShares1", + "coreApiShareOperationsToShares2", + "coreApiSharePublicLink1", + "coreApiSharePublicLink2", + "coreApiShareUpdateToShares", + "coreApiTrashbin", + "coreApiTrashbinRestore", + "coreApiVersions", + "coreApiWebdavDelete", + "coreApiWebdavLocks", + "coreApiWebdavLocks2", + "coreApiWebdavMove1", + "coreApiWebdavMove2", + "coreApiWebdavOperations", + "coreApiWebdavPreviews", + "coreApiWebdavProperties", + "coreApiWebdavUpload", + "coreApiWebdavUploadTUS", + "coreApiWebdavEtagPropagation1", + "coreApiWebdavEtagPropagation2", + ], }, "e2eTests": { "part": { @@ -1129,12 +1160,13 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac "BEHAT_FILTER_TAGS": filterTags, "DIVIDE_INTO_NUM_PARTS": number_of_parts, "RUN_PART": part_number, + "BEHAT_SUITE": config["apiTests"]["suites"][part_number], "EXPECTED_FAILURES_FILE": expectedFailuresFile, "UPLOAD_DELETE_WAIT_TIME": "1" if storage == "owncloud" else 0, "OCIS_WRAPPER_URL": "http://ocis-server:5200", }, "commands": [ - "make -C %s test-acceptance-from-core-api" % (dirs["base"]), + "make -C %s test-acceptance-api" % (dirs["base"]), ], }, ] + diff --git a/Makefile b/Makefile index 5c2a3060571..ecfa7dc6207 100644 --- a/Makefile +++ b/Makefile @@ -125,17 +125,11 @@ clean-tests: BEHAT_BIN=vendor-bin/behat/vendor/bin/behat # behat config file for parallel deployment tests PARALLEL_BEHAT_YML=tests/parallelDeployAcceptance/config/behat.yml -# behat config file for core api tests -CORE_BEHAT_YML=tests/acceptance/config/behat-core.yml .PHONY: test-acceptance-api test-acceptance-api: vendor-bin/behat/vendor BEHAT_BIN=$(BEHAT_BIN) $(PWD)/tests/acceptance/run.sh -.PHONY: test-acceptance-from-core-api -test-acceptance-from-core-api: vendor-bin/behat/vendor - BEHAT_BIN=$(BEHAT_BIN) BEHAT_YML=$(CORE_BEHAT_YML) $(PWD)/tests/acceptance/run.sh --type core-api - .PHONY: test-paralleldeployment-api test-paralleldeployment-api: vendor-bin/behat/vendor BEHAT_BIN=$(BEHAT_BIN) BEHAT_YML=$(PARALLEL_BEHAT_YML) $(PWD)/tests/acceptance/run.sh diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml deleted file mode 100644 index 0be28e490d2..00000000000 --- a/tests/acceptance/config/behat-core.yml +++ /dev/null @@ -1,334 +0,0 @@ -default: - autoload: - "": "%paths.base%/../bootstrap" - suites: - coreApiMain: - paths: - - "%paths.base%/../features/coreApiMain" - context: &common_ldap_suite_context - parameters: - ldapAdminPassword: admin - ldapUsersOU: TestUsers - ldapGroupsOU: TestGroups - ldapInitialUserFilePath: /../../config/ldap-users.ldif - contexts: - - FeatureContext: &common_feature_context_params - baseUrl: http://localhost:8080 - adminUsername: admin - adminPassword: admin - regularUserPassword: 123456 - ocPath: apps/testing/api/v1/occ - - ChecksumContext: - - FilesVersionsContext: - - TrashbinContext: - - CapabilitiesContext: - - SharingNgContext: - - coreApiAuth: - paths: - - "%paths.base%/../features/coreApiAuth" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SearchContext: - - PublicWebDavContext: - - WebDavPropertiesContext: - - AuthContext: - - coreApiCapabilities: - paths: - - "%paths.base%/../features/coreApiCapabilities" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - CapabilitiesContext: - - coreApiFavorites: - paths: - - "%paths.base%/../features/coreApiFavorites" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SpacesContext: - - FavoritesContext: - - WebDavPropertiesContext: - - SharingNgContext: - - coreApiShareCreateSpecialToShares1: - paths: - - "%paths.base%/../features/coreApiShareCreateSpecialToShares1" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - TrashbinContext: - - WebDavPropertiesContext: - - SettingsContext: - - coreApiShareCreateSpecialToShares2: - paths: - - "%paths.base%/../features/coreApiShareCreateSpecialToShares2" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - TrashbinContext: - - WebDavPropertiesContext: - - SettingsContext: - - SharingNgContext: - - coreApiSharees: - paths: - - "%paths.base%/../features/coreApiSharees" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - ShareesContext: - - OcisConfigContext: - - coreApiShareManagementToShares: - paths: - - "%paths.base%/../features/coreApiShareManagementToShares" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SpacesContext: - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - - FilesVersionsContext: - - SettingsContext: - - SharingNgContext: - - coreApiShareManagementBasicToShares: - paths: - - "%paths.base%/../features/coreApiShareManagementBasicToShares" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - - AuthContext: - - SharingNgContext: - - coreApiShareOperationsToShares1: - paths: - - "%paths.base%/../features/coreApiShareOperationsToShares1" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - - SettingsContext: - - SharingNgContext: - - coreApiShareOperationsToShares2: - paths: - - "%paths.base%/../features/coreApiShareOperationsToShares2" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - - SharingNgContext: - - coreApiSharePublicLink1: - paths: - - "%paths.base%/../features/coreApiSharePublicLink1" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - SharingNgContext: - - WebDavPropertiesContext: - - OcisConfigContext: - - coreApiSharePublicLink2: - paths: - - "%paths.base%/../features/coreApiSharePublicLink2" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - - OcisConfigContext: - - SharingNgContext: - - coreApiShareUpdateToShares: - paths: - - "%paths.base%/../features/coreApiShareUpdateToShares" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TrashbinContext: - - WebDavPropertiesContext: - - SharingNgContext: - - coreApiTrashbin: - paths: - - "%paths.base%/../features/coreApiTrashbin" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - TrashbinContext: - - WebDavPropertiesContext: - - SharingNgContext: - - coreApiTrashbinRestore: - paths: - - "%paths.base%/../features/coreApiTrashbinRestore" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - TrashbinContext: - - WebDavPropertiesContext: - - coreApiVersions: - paths: - - "%paths.base%/../features/coreApiVersions" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - ChecksumContext: - - FilesVersionsContext: - - WebDavPropertiesContext: - - TrashbinContext: - - SharingNgContext: - - coreApiWebdavDelete: - paths: - - "%paths.base%/../features/coreApiWebdavDelete" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SearchContext: - - PublicWebDavContext: - - WebDavPropertiesContext: - - TrashbinContext: - - coreApiWebdavLocks: - paths: - - "%paths.base%/../features/coreApiWebdavLocks" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - WebDavLockingContext: - - WebDavPropertiesContext: - - coreApiWebdavLocks2: - paths: - - "%paths.base%/../features/coreApiWebdavLocks2" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - WebDavLockingContext: - - WebDavPropertiesContext: - - coreApiWebdavMove1: - paths: - - "%paths.base%/../features/coreApiWebdavMove1" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - WebDavPropertiesContext: - - TrashbinContext: - - coreApiWebdavMove2: - paths: - - "%paths.base%/../features/coreApiWebdavMove2" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SharingNgContext: - - WebDavPropertiesContext: - - FilesVersionsContext: - - TrashbinContext: - - coreApiWebdavOperations: - paths: - - "%paths.base%/../features/coreApiWebdavOperations" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SearchContext: - - PublicWebDavContext: - - SharingNgContext: - - WebDavPropertiesContext: - - TrashbinContext: - - OcisConfigContext: - - coreApiWebdavPreviews: - paths: - - "%paths.base%/../features/coreApiWebdavPreviews" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SharingNgContext: - - WebDavPropertiesContext: - - coreApiWebdavProperties: - paths: - - "%paths.base%/../features/coreApiWebdavProperties" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - SharingNgContext: - - WebDavPropertiesContext: - - coreApiWebdavUpload: - paths: - - "%paths.base%/../features/coreApiWebdavUpload" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - WebDavPropertiesContext: - - SharingNgContext: - - coreApiWebdavUploadTUS: - paths: - - "%paths.base%/../features/coreApiWebdavUploadTUS" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - PublicWebDavContext: - - TUSContext: - - FilesVersionsContext: - - ChecksumContext: - - SharingNgContext: - - coreApiWebdavEtagPropagation1: - paths: - - "%paths.base%/../features/coreApiWebdavEtagPropagation1" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - TrashbinContext: - - PublicWebDavContext: - - FilesVersionsContext: - - SharingNgContext: - - WebDavPropertiesContext: - - coreApiWebdavEtagPropagation2: - paths: - - "%paths.base%/../features/coreApiWebdavEtagPropagation2" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - TrashbinContext: - - PublicWebDavContext: - - FilesVersionsContext: - - SharingNgContext: - - WebDavPropertiesContext: - - OcisConfigContext: - - extensions: - rdx\behatvars\BehatVariablesExtension: ~ - - Cjm\Behat\StepThroughExtension: ~ diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 403a7d08474..053e110ddd3 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -422,6 +422,332 @@ default: - TagContext: - TrashbinContext: + coreApiMain: + paths: + - "%paths.base%/../features/coreApiMain" + context: &common_ldap_suite_context + parameters: + ldapAdminPassword: admin + ldapUsersOU: TestUsers + ldapGroupsOU: TestGroups + ldapInitialUserFilePath: /../../config/ldap-users.ldif + contexts: + - FeatureContext: &common_feature_context_params + baseUrl: http://localhost:8080 + adminUsername: admin + adminPassword: admin + regularUserPassword: 123456 + ocPath: apps/testing/api/v1/occ + - ChecksumContext: + - FilesVersionsContext: + - TrashbinContext: + - CapabilitiesContext: + - SharingNgContext: + + coreApiAuth: + paths: + - "%paths.base%/../features/coreApiAuth" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SearchContext: + - PublicWebDavContext: + - WebDavPropertiesContext: + - AuthContext: + + coreApiCapabilities: + paths: + - "%paths.base%/../features/coreApiCapabilities" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - CapabilitiesContext: + + coreApiFavorites: + paths: + - "%paths.base%/../features/coreApiFavorites" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SpacesContext: + - FavoritesContext: + - WebDavPropertiesContext: + - SharingNgContext: + + coreApiShareCreateSpecialToShares1: + paths: + - "%paths.base%/../features/coreApiShareCreateSpecialToShares1" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - TrashbinContext: + - WebDavPropertiesContext: + - SettingsContext: + + coreApiShareCreateSpecialToShares2: + paths: + - "%paths.base%/../features/coreApiShareCreateSpecialToShares2" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - TrashbinContext: + - WebDavPropertiesContext: + - SettingsContext: + - SharingNgContext: + + coreApiSharees: + paths: + - "%paths.base%/../features/coreApiSharees" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - ShareesContext: + - OcisConfigContext: + + coreApiShareManagementToShares: + paths: + - "%paths.base%/../features/coreApiShareManagementToShares" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SpacesContext: + - PublicWebDavContext: + - TrashbinContext: + - WebDavPropertiesContext: + - FilesVersionsContext: + - SettingsContext: + - SharingNgContext: + + coreApiShareManagementBasicToShares: + paths: + - "%paths.base%/../features/coreApiShareManagementBasicToShares" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - TrashbinContext: + - WebDavPropertiesContext: + - AuthContext: + - SharingNgContext: + + coreApiShareOperationsToShares1: + paths: + - "%paths.base%/../features/coreApiShareOperationsToShares1" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - TrashbinContext: + - WebDavPropertiesContext: + - SettingsContext: + - SharingNgContext: + + coreApiShareOperationsToShares2: + paths: + - "%paths.base%/../features/coreApiShareOperationsToShares2" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - TrashbinContext: + - WebDavPropertiesContext: + - SharingNgContext: + + coreApiSharePublicLink1: + paths: + - "%paths.base%/../features/coreApiSharePublicLink1" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - TrashbinContext: + - SharingNgContext: + - WebDavPropertiesContext: + - OcisConfigContext: + + coreApiSharePublicLink2: + paths: + - "%paths.base%/../features/coreApiSharePublicLink2" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - TrashbinContext: + - WebDavPropertiesContext: + - OcisConfigContext: + - SharingNgContext: + + coreApiShareUpdateToShares: + paths: + - "%paths.base%/../features/coreApiShareUpdateToShares" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - TrashbinContext: + - WebDavPropertiesContext: + - SharingNgContext: + + coreApiTrashbin: + paths: + - "%paths.base%/../features/coreApiTrashbin" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - TrashbinContext: + - WebDavPropertiesContext: + - SharingNgContext: + + coreApiTrashbinRestore: + paths: + - "%paths.base%/../features/coreApiTrashbinRestore" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - TrashbinContext: + - WebDavPropertiesContext: + + coreApiVersions: + paths: + - "%paths.base%/../features/coreApiVersions" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - ChecksumContext: + - FilesVersionsContext: + - WebDavPropertiesContext: + - TrashbinContext: + - SharingNgContext: + + coreApiWebdavDelete: + paths: + - "%paths.base%/../features/coreApiWebdavDelete" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SearchContext: + - PublicWebDavContext: + - WebDavPropertiesContext: + - TrashbinContext: + + coreApiWebdavLocks: + paths: + - "%paths.base%/../features/coreApiWebdavLocks" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - WebDavLockingContext: + - WebDavPropertiesContext: + + coreApiWebdavLocks2: + paths: + - "%paths.base%/../features/coreApiWebdavLocks2" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - WebDavLockingContext: + - WebDavPropertiesContext: + + coreApiWebdavMove1: + paths: + - "%paths.base%/../features/coreApiWebdavMove1" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - WebDavPropertiesContext: + - TrashbinContext: + + coreApiWebdavMove2: + paths: + - "%paths.base%/../features/coreApiWebdavMove2" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SharingNgContext: + - WebDavPropertiesContext: + - FilesVersionsContext: + - TrashbinContext: + + coreApiWebdavOperations: + paths: + - "%paths.base%/../features/coreApiWebdavOperations" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SearchContext: + - PublicWebDavContext: + - SharingNgContext: + - WebDavPropertiesContext: + - TrashbinContext: + - OcisConfigContext: + + coreApiWebdavPreviews: + paths: + - "%paths.base%/../features/coreApiWebdavPreviews" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SharingNgContext: + - WebDavPropertiesContext: + + coreApiWebdavProperties: + paths: + - "%paths.base%/../features/coreApiWebdavProperties" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - SharingNgContext: + - WebDavPropertiesContext: + + coreApiWebdavUpload: + paths: + - "%paths.base%/../features/coreApiWebdavUpload" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - WebDavPropertiesContext: + - SharingNgContext: + + coreApiWebdavUploadTUS: + paths: + - "%paths.base%/../features/coreApiWebdavUploadTUS" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - PublicWebDavContext: + - TUSContext: + - FilesVersionsContext: + - ChecksumContext: + - SharingNgContext: + + coreApiWebdavEtagPropagation1: + paths: + - "%paths.base%/../features/coreApiWebdavEtagPropagation1" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - TrashbinContext: + - PublicWebDavContext: + - FilesVersionsContext: + - SharingNgContext: + - WebDavPropertiesContext: + + coreApiWebdavEtagPropagation2: + paths: + - "%paths.base%/../features/coreApiWebdavEtagPropagation2" + context: *common_ldap_suite_context + contexts: + - FeatureContext: *common_feature_context_params + - TrashbinContext: + - PublicWebDavContext: + - FilesVersionsContext: + - SharingNgContext: + - WebDavPropertiesContext: + - OcisConfigContext: + extensions: rdx\behatvars\BehatVariablesExtension: ~