diff --git a/.github/workflows/k8s.yml b/.github/workflows/k8s.yml index 0ebdc74df3a..2c1b30cb154 100644 --- a/.github/workflows/k8s.yml +++ b/.github/workflows/k8s.yml @@ -485,9 +485,9 @@ jobs: - suite: app-provider args: "--type playwright --suites app-provider" collaboration: true - # - suite: ocm - # args: "--type playwright --suites ocm" - # federated: true + - suite: ocm + args: "--type playwright --suites ocm" + federated: true # - suite: vault-storage # args: "--type playwright --suites vault-storage" # vault_storage: true @@ -542,7 +542,13 @@ jobs: - name: Prepare Helm Charts env: ENABLE_WOPI: ${{ matrix.suite == 'app-provider' }} - run: make -C tests/config/k8s prepare-charts + ENABLE_OCM: ${{ matrix.suite == 'ocm' }} + run: | + cd tests/config/k8s + make prepare-charts + if [[ "${{ matrix.suite }}" == "ocm" ]]; then + OCM=true make prepare-charts + fi - name: Deploy Suite-Specific External Backends run: | @@ -609,6 +615,9 @@ jobs: cd tests/config/k8s kubectl get pods -n "$TEST_SERVER_DOMAIN" -Aw & make deploy-ocis + if [[ "${{ matrix.suite }}" == "ocm" ]]; then + OCM=true make deploy-ocis + fi - name: Expose node ports if: ${{ matrix.suite == 'app-provider' }} @@ -689,6 +698,8 @@ jobs: K8S: ${{ env.K8S }} TEST_SERVER_URL: ${{ env.TEST_SERVER_URL }} COLLABORATION_NEEDED: ${{ matrix.collaboration == true && 'true' || 'false' }} + FED_SERVER_URL: ${{ env.FED_SERVER_URL }} + FEDERATED_NEEDED: ${{ matrix.federated == true && 'true' || 'false' }} run: python3 tests/acceptance/run-e2e.py - name: Upload Playwright traces diff --git a/tests/acceptance/run-e2e.py b/tests/acceptance/run-e2e.py index 0eb1561ce3c..eefdc753393 100755 --- a/tests/acceptance/run-e2e.py +++ b/tests/acceptance/run-e2e.py @@ -152,6 +152,11 @@ def main() -> int: "REPORT_TRACING": "false", "BROWSER": "chromium", } + if os.environ.get("FEDERATED_NEEDED", "").lower() == "true": + federated_url = os.environ["FED_SERVER_URL"] + wait_for(lambda: ocis_healthy(federated_url), 120, "ocis-federated") + print("ocis-federated ready.") + playwright_env["FEDERATED_BASE_URL_OCIS"] = federated_url print(f"Running e2e: {e2e_args}") result = subprocess.run( ["bash", "run-e2e.sh"] + shlex.split(e2e_args), diff --git a/tests/config/k8s/setup.sh b/tests/config/k8s/setup.sh index 128687b0502..29c6234528a 100644 --- a/tests/config/k8s/setup.sh +++ b/tests/config/k8s/setup.sh @@ -77,6 +77,32 @@ if [[ "$ENABLE_WOPI" == "true" ]]; then sed -i "s|availableUnifiedRoles: \[\]|availableUnifiedRoles: ['b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5','a8d5fe5e-96e3-418d-825b-534dbdf22b99','fb6c3e19-e378-47e5-b277-9732f9de6e21','58c63c02-1d89-4572-916a-870abc5a1b7d','2d00ce52-1fc2-4dbc-8b95-a73b73395f5a','1c996275-f1c9-4e71-abdf-a42f6495e960','312c0871-5ef7-4b3a-85b6-0e4074c64049','aa97fe03-7980-45ac-9e50-b325749fd7e6']|" $CFG_DIR/values.yaml fi +if [[ "$ENABLE_OCM" == "true" ]]; then + sed -i '/ocm:/{n;s|false|true|}' $CFG_DIR/values.yaml + # enabling the ocm backend service does NOT make the web UI show the + # "open-cloud-mesh" app -- that's gated by services.web.config.apps, which + # the chart leaves unset by default so it falls back to the ocis binary's + # own default list (services/web/pkg/config/defaults/defaultconfig.go), + # and that list doesn't include "ocm". Since Helm's `with` fully replaces + # the array rather than merging, we must repeat the full default list here + # (see run-e2e.py's equivalent gha_web_cfg["apps"].append("ocm") for the + # non-k8s path). + sed -i '/^ web:/a\ + config:\ + apps:\ + - files\ + - search\ + - text-editor\ + - mermaid-editor\ + - pdf-viewer\ + - external\ + - admin-settings\ + - epub-reader\ + - preview\ + - app-store\ + - ocm' $CFG_DIR/values.yaml +fi + if [[ "$ENABLE_OCM" == "true" ]]; then sed -i '/ocm:/{n;s|false|true|}' $CFG_DIR/values.yaml fi