diff --git a/.woodpecker.env b/.woodpecker.env new file mode 100644 index 00000000000..c382704d6b7 --- /dev/null +++ b/.woodpecker.env @@ -0,0 +1,4 @@ +# The test runner source for API tests +APITESTS_COMMITID=a414a2015d675ef2fc7e1b8515102a1f7378a2fa +APITESTS_BRANCH=main +APITESTS_REPO_GIT_URL=https://github.com/opencloud-eu/opencloud \ No newline at end of file diff --git a/.woodpecker/api-integration-test-on-decomposed.yaml b/.woodpecker/api-integration-test-on-decomposed.yaml new file mode 100644 index 00000000000..7875db43c4d --- /dev/null +++ b/.woodpecker/api-integration-test-on-decomposed.yaml @@ -0,0 +1,91 @@ +--- +depends_on: [ build ] + +variables: + - &golang_image 'docker.io/golang:1.24' + - &alpine_image 'owncloudci/alpine:latest' + - &behat_image 'cs3org/behat:latest' + - &ldap_image 'osixia/openldap:1.3.0' + - &minio_image 'minio/mc:RELEASE.2021-10-07T04-19-58Z' + - &woodpecker_wait_plugin_image 'ghcr.io/dvjn/woodpecker-is-it-up-yet-plugin' + +when: + - event: [ push , manual ] + branch: ${CI_REPO_DEFAULT_BRANCH} + - event: [ pull_request ] + +matrix: + RUN_PART: [ 1, 2, 3, 4 ] + +steps: + fetch-binary: + image: *minio_image + environment: + AWS_ACCESS_KEY_ID: + from_secret: cache_s3_access_key + AWS_SECRET_ACCESS_KEY: + from_secret: cache_s3_secret_key + S3_BUCKET: + from_secret: cache_s3_bucket + S3_ENDPOINT: + from_secret: cache_s3_server + commands: + - mc alias set s3 $S3_ENDPOINT $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY + - mc cp -a s3/$S3_BUCKET/opencloud-eu/reva/$CI_COMMIT_SHA-$CI_PIPELINE_NUMBER-revad $CI_WORKSPACE/cmd/revad/revad + revad-services: + image: *golang_image + detach: true + commands: + - cd tests/oc-integration-tests/ci/ + - ../../../cmd/revad/revad -c frontend.toml & + - ../../../cmd/revad/revad -c gateway.toml & + - ../../../cmd/revad/revad -c shares.toml & + - ../../../cmd/revad/revad -c storage-shares.toml & + - ../../../cmd/revad/revad -c machine-auth.toml & + - ../../../cmd/revad/revad -c storage-users-decomposed.toml & + - ../../../cmd/revad/revad -c storage-publiclink.toml & + - ../../../cmd/revad/revad -c permissions-demo-ci.toml & + - ../../../cmd/revad/revad -c ldap-users.toml + wait_for_server: + image: *woodpecker_wait_plugin_image + settings: + host: revad-services + port: 19000 + + clone_api_tests: + image: *alpine_image + commands: + - . ./.woodpecker.env + - git clone -b $APITESTS_BRANCH --single-branch --no-tags $APITESTS_REPO_GIT_URL + - cd opencloud + - git checkout $APITESTS_COMMITID + + opencloud-api-tests: + image: *behat_image + commands: + - cd opencloud + - make test-acceptance-api + environment: + TEST_SERVER_URL: "http://revad-services:20080" + OC_REVA_DATA_ROOT: "/woodpecker/src/reva/data" + DELETE_USER_DATA_CMD: "rm -rf /woodpecker/src/reva/data/spaces/* /woodpecker/src/reva/data/blobs/* /woodpecker/src/reva/data/indexes/by-type/*" + STORAGE_DRIVER: "decomposed" + TEST_WITH_LDAP: True + REVA_LDAP_HOSTNAME: "ldap" + TEST_REVA: True + SEND_SCENARIO_LINE_REFERENCES: True + BEHAT_FILTER_TAGS: "~@skip&&~@skipOnReva&&~@env-config" + DIVIDE_INTO_NUM_PARTS: "4" + RUN_PART: "${RUN_PART}" + EXPECTED_FAILURES_FILE: "/woodpecker/src/github.com/opencloud-eu/reva/tests/acceptance/expected-failures-on-decomposed-storage.md" + ACCEPTANCE_TEST_TYPE: "core-api" + +services: + ldap: + image: *ldap_image + environment: + LDAP_DOMAIN: "example.org" + LDAP_ORGANISATION: "example" + LDAP_ADMIN_PASSWORD: "admin" + LDAP_TLS_VERIFY_CLIENT: "never" + HOSTNAME: "ldap" \ No newline at end of file diff --git a/.woodpecker/purge-cache.yaml b/.woodpecker/purge-cache.yaml index 692e1691122..248de962f1d 100644 --- a/.woodpecker/purge-cache.yaml +++ b/.woodpecker/purge-cache.yaml @@ -1,9 +1,8 @@ --- -depends_on: [test, test-integration] +depends_on: [test, test-integration, api-integration-test-on-decomposed] variables: - &minio_image 'minio/mc:RELEASE.2021-10-07T04-19-58Z' - - &s3_plugin_image 'plugins/s3-cache:1' when: - event: [ push , manual ] @@ -25,5 +24,5 @@ steps: from_secret: cache_s3_server commands: - mc alias set s3 $S3_ENDPOINT $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY - - mc rm --recursive --force s3/$S3_BUCKET/opencloud-eu/reva + - mc rm --recursive --force s3/$S3_BUCKET/${CI_REPO}/$CI_COMMIT_SHA-$CI_PIPELINE_NUMBER-revad - mc ls --recursive s3/$S3_BUCKET/opencloud-eu/reva \ No newline at end of file diff --git a/tests/acceptance/expected-failures-on-decomposed-storage.md b/tests/acceptance/expected-failures-on-decomposed-storage.md index 90317297b99..85bdc131d4e 100644 --- a/tests/acceptance/expected-failures-on-decomposed-storage.md +++ b/tests/acceptance/expected-failures-on-decomposed-storage.md @@ -93,38 +93,6 @@ _ocdav: api compatibility, return correct status code_ #### [Difference in response content of status.php and default capabilities](https://github.com/owncloud/ocis/issues/1286) - [coreApiCapabilities/capabilitiesWithNormalUser.feature:13](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiCapabilities/capabilitiesWithNormalUser.feature#L13) Scenario: getting default capabilities with normal user -#### [spaces endpoint does not allow REPORT requests](https://github.com/owncloud/ocis/issues/4034) -- [coreApiWebdavOperations/search.feature:42](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L42) -- [coreApiWebdavOperations/search.feature:43](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L43) -- [coreApiWebdavOperations/search.feature:44](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L44) -- [coreApiWebdavOperations/search.feature:60](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L60) -- [coreApiWebdavOperations/search.feature:61](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L61) -- [coreApiWebdavOperations/search.feature:62](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L62) -- [coreApiWebdavOperations/search.feature:79](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L79) -- [coreApiWebdavOperations/search.feature:80](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L80) -- [coreApiWebdavOperations/search.feature:81](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L81) -- [coreApiWebdavOperations/search.feature:90](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L90) -- [coreApiWebdavOperations/search.feature:91](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L91) -- [coreApiWebdavOperations/search.feature:92](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L92) -- [coreApiWebdavOperations/search.feature:110](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L110) -- [coreApiWebdavOperations/search.feature:111](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L111) -- [coreApiWebdavOperations/search.feature:112](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L112) -- [coreApiWebdavOperations/search.feature:130](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L130) -- [coreApiWebdavOperations/search.feature:131](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L131) -- [coreApiWebdavOperations/search.feature:132](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L132) -- [coreApiWebdavOperations/search.feature:151](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L151) -- [coreApiWebdavOperations/search.feature:152](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L152) -- [coreApiWebdavOperations/search.feature:153](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L153) -- [coreApiWebdavOperations/search.feature:180](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L180) -- [coreApiWebdavOperations/search.feature:181](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L181) -- [coreApiWebdavOperations/search.feature:182](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L182) -- [coreApiWebdavOperations/search.feature:208](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L208) -- [coreApiWebdavOperations/search.feature:209](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L209) -- [coreApiWebdavOperations/search.feature:210](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L210) -- [coreApiWebdavOperations/search.feature:229](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L229) -- [coreApiWebdavOperations/search.feature:230](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L230) -- [coreApiWebdavOperations/search.feature:231](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/search.feature#L231) - #### [Support for favorites](https://github.com/owncloud/ocis/issues/1228) - [coreApiFavorites/favorites.feature:101](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiFavorites/favorites.feature#L101) - [coreApiFavorites/favorites.feature:102](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiFavorites/favorites.feature#L102) @@ -216,14 +184,5 @@ _The below features have been added after I last categorized them. AFAICT they a - [coreApiWebdavProperties/copyFile.feature:1095](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1095) - [coreApiWebdavProperties/copyFile.feature:1096](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1096) -#### [Uploading with the same mtime and filename causes "internal server errors"](https://github.com/owncloud/ocis/issues/10496) - -- [coreApiWebdavUpload/uploadFile.feature:400](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L400) -- [coreApiWebdavUpload/uploadFile.feature:401](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L401) -- [coreApiWebdavUpload/uploadFile.feature:402](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L402) -- [coreApiWebdavUploadTUS/uploadFileMtime.feature:79](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L79) -- [coreApiWebdavUploadTUS/uploadFileMtime.feature:80](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L80) -- [coreApiWebdavUploadTUS/uploadFileMtime.feature:81](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFileMtime.feature#L81) - - Note: always have an empty line at the end of this file. The bash script that processes this file may not process a scenario reference on the last line. diff --git a/tests/oc-integration-tests/ci/gateway-virtual.toml b/tests/oc-integration-tests/ci/gateway-virtual.toml index e5595ad28a3..b229dc4457c 100644 --- a/tests/oc-integration-tests/ci/gateway-virtual.toml +++ b/tests/oc-integration-tests/ci/gateway-virtual.toml @@ -37,7 +37,7 @@ datagateway = "http://localhost:19001/data" transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads transfer_expires = 6 # give it a moment #disable_home_creation_on_login = true -link_grants_file = "/go/src/tmp/reva/link_grants_file.json" +link_grants_file = "/woodpecker/src/reva/link_grants_file.json" [grpc.services.authregistry] driver = "static" diff --git a/tests/oc-integration-tests/ci/gateway.toml b/tests/oc-integration-tests/ci/gateway.toml index 93dfa7617a6..800aaaf907a 100644 --- a/tests/oc-integration-tests/ci/gateway.toml +++ b/tests/oc-integration-tests/ci/gateway.toml @@ -39,7 +39,7 @@ datagateway = "http://localhost:19001/data" transfer_shared_secret = "replace-me-with-a-transfer-secret" # for direct uploads transfer_expires = 6 # give it a moment #disable_home_creation_on_login = true -link_grants_file = "/go/src/tmp/reva/link_grants_file.json" +link_grants_file = "/woodpecker/src/reva/link_grants_file.json" [grpc.services.authregistry] driver = "static" diff --git a/tests/oc-integration-tests/ci/shares.toml b/tests/oc-integration-tests/ci/shares.toml index 8e90f5c9b6e..18b8864016e 100644 --- a/tests/oc-integration-tests/ci/shares.toml +++ b/tests/oc-integration-tests/ci/shares.toml @@ -17,5 +17,5 @@ auth_manager = "publicshares" gateway_addr = "localhost:19000" [grpc.services.publicshareprovider.drivers.json] -file = "/go/src/tmp/reva/publicshares.json" +file = "/woodpecker/src/reva/publicshares.json" gateway_addr = "localhost:19000" diff --git a/tests/oc-integration-tests/ci/storage-users-0-9.toml b/tests/oc-integration-tests/ci/storage-users-0-9.toml index d0675e385f2..dadd67058a2 100644 --- a/tests/oc-integration-tests/ci/storage-users-0-9.toml +++ b/tests/oc-integration-tests/ci/storage-users-0-9.toml @@ -23,7 +23,7 @@ expose_data_server = true data_server_url = "http://revad-services:11001/data" [grpc.services.storageprovider.drivers.decomposed] -root = "/go/src/tmp/reva/data-0-9" +root = "/woodpecker/src/reva/data-0-9" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" @@ -37,7 +37,7 @@ driver = "decomposed" temp_folder = "/var/tmp/reva/tmp" [http.services.dataprovider.drivers.decomposed] -root = "/go/src/tmp/reva/data-0-9" +root = "/woodpecker/src/reva/data-0-9" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" diff --git a/tests/oc-integration-tests/ci/storage-users-a-f.toml b/tests/oc-integration-tests/ci/storage-users-a-f.toml index 8de486fdc8a..98042da6d80 100644 --- a/tests/oc-integration-tests/ci/storage-users-a-f.toml +++ b/tests/oc-integration-tests/ci/storage-users-a-f.toml @@ -23,7 +23,7 @@ expose_data_server = true data_server_url = "http://revad-services:11011/data" [grpc.services.storageprovider.drivers.decomposed] -root = "/go/src/tmp/reva/data-a-f" +root = "/woodpecker/src/reva/data-a-f" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" @@ -37,7 +37,7 @@ driver = "decomposed" temp_folder = "/var/tmp/reva/tmp" [http.services.dataprovider.drivers.decomposed] -root = "/go/src/tmp/reva/data-a-f" +root = "/woodpecker/src/reva/data-a-f" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" diff --git a/tests/oc-integration-tests/ci/storage-users-decomposed.toml b/tests/oc-integration-tests/ci/storage-users-decomposed.toml index b829aeed6e3..066f47b6a56 100644 --- a/tests/oc-integration-tests/ci/storage-users-decomposed.toml +++ b/tests/oc-integration-tests/ci/storage-users-decomposed.toml @@ -21,7 +21,7 @@ gateway_addr = "0.0.0.0:19000" mount_id = "1284d238-aa92-42ce-bdc4-0b0000009157" [grpc.services.storageprovider.drivers.decomposed] -root = "/go/src/tmp/reva/data" +root = "/woodpecker/src/reva/data" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" @@ -35,10 +35,10 @@ address = "0.0.0.0:11001" [http.services.dataprovider] driver = "decomposed" -temp_folder = "/go/src/tmp/reva/tmp" +temp_folder = "/woodpecker/src/reva/tmp" [http.services.dataprovider.drivers.decomposed] -root = "/go/src/tmp/reva/data" +root = "/woodpecker/src/reva/data" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" diff --git a/tests/oc-integration-tests/ci/storage-users-decomposeds3.toml b/tests/oc-integration-tests/ci/storage-users-decomposeds3.toml index 0957a835476..61221469fcf 100644 --- a/tests/oc-integration-tests/ci/storage-users-decomposeds3.toml +++ b/tests/oc-integration-tests/ci/storage-users-decomposeds3.toml @@ -19,7 +19,7 @@ data_server_url = "http://revad-services:11001/data" mount_id = "1284d238-aa92-42ce-bdc4-0b0000009157" [grpc.services.storageprovider.drivers.decomposeds3] -root = "/go/src/tmp/reva/data" +root = "/woodpecker/src/reva/data" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" @@ -36,10 +36,10 @@ address = "0.0.0.0:11001" [http.services.dataprovider] driver = "decomposeds3" -temp_folder = "/go/src/tmp/reva/tmp" +temp_folder = "/woodpecker/src/reva/tmp" [http.services.dataprovider.drivers.decomposeds3] -root = "/go/src/tmp/reva/data" +root = "/woodpecker/src/reva/data" treetime_accounting = true treesize_accounting = true permissionssvc = "localhost:10000" diff --git a/tests/oc-integration-tests/ci/storage-users-posix.toml b/tests/oc-integration-tests/ci/storage-users-posix.toml index 67ee95b2fa6..ae9111e3687 100644 --- a/tests/oc-integration-tests/ci/storage-users-posix.toml +++ b/tests/oc-integration-tests/ci/storage-users-posix.toml @@ -20,7 +20,7 @@ gateway_addr = "0.0.0.0:19000" mount_id = "1284d238-aa92-42ce-bdc4-0b0000009157" [grpc.services.storageprovider.drivers.posix] -root = "/go/src/tmp/reva/data" +root = "/woodpecker/src/reva/data" permissionssvc = "localhost:10000" treetime_accounting = true treesize_accounting = true @@ -42,10 +42,10 @@ address = "0.0.0.0:11001" [http.services.dataprovider] driver = "posix" -temp_folder = "/go/src/tmp/reva/tmp" +temp_folder = "/woodpecker/src/reva/tmp" [http.services.dataprovider.drivers.posix] -root = "/go/src/tmp/reva/data" +root = "/woodpecker/src/reva/data" permissionssvc = "localhost:10000" treetime_accounting = true treesize_accounting = true