From 7931ae4212409b26e3e589f0d3ead8b80dc53861 Mon Sep 17 00:00:00 2001 From: Jean Scherf Date: Tue, 16 Jun 2026 13:17:43 -0300 Subject: [PATCH 1/2] fix(ci): inject TENANT_SUBDOMAIN and APPFND_CONHOS_LANDSCAPE in integration tests workflow --- .github/workflows/integration-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 1dd5aec7..7fdc4cc6 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -44,20 +44,20 @@ jobs: echo "Setting up environment variables for integration tests..." # Process GitHub secrets (all configuration stored as secrets) - echo '${{ toJSON(secrets) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_")) | "\(.key)=\(.value)"' | while read line; do + echo '${{ toJSON(secrets) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_") or .key == "TENANT_SUBDOMAIN" or .key == "APPFND_CONHOS_LANDSCAPE") | "\(.key)=\(.value)"' | while read line; do echo "$line" >> $GITHUB_ENV var_name=$(echo "$line" | cut -d= -f1) echo "Set secret: $var_name" done # Process GitHub variables (all configuration stored as variables) - echo '${{ toJSON(vars) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_")) | "\(.key)=\(.value)"' | while read line; do + echo '${{ toJSON(vars) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_") or .key == "TENANT_SUBDOMAIN" or .key == "APPFND_CONHOS_LANDSCAPE") | "\(.key)=\(.value)"' | while read line; do echo "$line" >> $GITHUB_ENV var_name=$(echo "$line" | cut -d= -f1) echo "Set variable: $var_name" done - echo "Environment setup complete - automatically configured all CLOUD_SDK_CFG_* and AICORE_* environment variables and secrets" + echo "Environment setup complete - automatically configured all CLOUD_SDK_CFG_*, AICORE_*, TENANT_SUBDOMAIN, and APPFND_CONHOS_LANDSCAPE environment variables and secrets" - name: Run integration tests run: uv run pytest tests/*/integration/ -v --tb=short From 984f6408a50a734ad1cf8ff9557401e17f5fcee6 Mon Sep 17 00:00:00 2001 From: Jean Scherf Date: Tue, 16 Jun 2026 13:23:34 -0300 Subject: [PATCH 2/2] fix(ci): rename AGW integration test env vars to CLOUD_SDK_CFG_AGW_DEFAULT_* pattern --- .env_integration_tests.example | 4 ++-- .github/workflows/integration-tests.yml | 6 +++--- tests/agentgateway/integration/conftest.py | 8 ++++++-- tests/agentgateway/integration/test_agw_bdd.py | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.env_integration_tests.example b/.env_integration_tests.example index 5d034969..9ecbe8e8 100644 --- a/.env_integration_tests.example +++ b/.env_integration_tests.example @@ -34,8 +34,8 @@ CLOUD_SDK_CFG_ADMS_DEFAULT_URL=https://your-tenant.accounts.ondemand.com CLOUD_SDK_CFG_ADMS_DEFAULT_URI=https://your-adm-host.cfapps.eu20.hana.ondemand.com CLOUD_SDK_CFG_ADMS_DEFAULT_RESOURCE=urn:sap:identity:application:provider:name:your-adm-app-name -APPFND_CONHOS_LANDSCAPE=your-landscape-here -TENANT_SUBDOMAIN=your-tenant-subdomain-here +CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN=your-tenant-subdomain-here +CLOUD_SDK_CFG_AGW_DEFAULT_LANDSCAPE=your-landscape-here AGW_USER_TOKEN=your-user-jwt-here # AI Core — required for Traceloop/LangGraph integration tests diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7fdc4cc6..1dd5aec7 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -44,20 +44,20 @@ jobs: echo "Setting up environment variables for integration tests..." # Process GitHub secrets (all configuration stored as secrets) - echo '${{ toJSON(secrets) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_") or .key == "TENANT_SUBDOMAIN" or .key == "APPFND_CONHOS_LANDSCAPE") | "\(.key)=\(.value)"' | while read line; do + echo '${{ toJSON(secrets) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_")) | "\(.key)=\(.value)"' | while read line; do echo "$line" >> $GITHUB_ENV var_name=$(echo "$line" | cut -d= -f1) echo "Set secret: $var_name" done # Process GitHub variables (all configuration stored as variables) - echo '${{ toJSON(vars) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_") or .key == "TENANT_SUBDOMAIN" or .key == "APPFND_CONHOS_LANDSCAPE") | "\(.key)=\(.value)"' | while read line; do + echo '${{ toJSON(vars) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_") or startswith("AICORE_")) | "\(.key)=\(.value)"' | while read line; do echo "$line" >> $GITHUB_ENV var_name=$(echo "$line" | cut -d= -f1) echo "Set variable: $var_name" done - echo "Environment setup complete - automatically configured all CLOUD_SDK_CFG_*, AICORE_*, TENANT_SUBDOMAIN, and APPFND_CONHOS_LANDSCAPE environment variables and secrets" + echo "Environment setup complete - automatically configured all CLOUD_SDK_CFG_* and AICORE_* environment variables and secrets" - name: Run integration tests run: uv run pytest tests/*/integration/ -v --tb=short diff --git a/tests/agentgateway/integration/conftest.py b/tests/agentgateway/integration/conftest.py index aa96899e..90390963 100644 --- a/tests/agentgateway/integration/conftest.py +++ b/tests/agentgateway/integration/conftest.py @@ -21,9 +21,13 @@ def agw_client() -> AgentGatewayClient: """Create an AgentGatewayClient from environment variables.""" _setup_cloud_mode() - tenant_subdomain = os.environ.get("TENANT_SUBDOMAIN") + tenant_subdomain = os.environ.get("CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN") if not tenant_subdomain: - pytest.fail("TENANT_SUBDOMAIN environment variable is not set") + pytest.fail("CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN environment variable is not set") + + landscape = os.environ.get("CLOUD_SDK_CFG_AGW_DEFAULT_LANDSCAPE") + if landscape: + os.environ.setdefault("APPFND_CONHOS_LANDSCAPE", landscape) try: return create_client(tenant_subdomain=tenant_subdomain) diff --git a/tests/agentgateway/integration/test_agw_bdd.py b/tests/agentgateway/integration/test_agw_bdd.py index 0d6799da..46c84d0d 100644 --- a/tests/agentgateway/integration/test_agw_bdd.py +++ b/tests/agentgateway/integration/test_agw_bdd.py @@ -2,8 +2,8 @@ Run against a live BTP tenant: - APPFND_CONHOS_LANDSCAPE= \\ - TENANT_SUBDOMAIN= \\ + CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN= \\ + CLOUD_SDK_CFG_AGW_DEFAULT_LANDSCAPE= \\ CLOUD_SDK_CFG_DESTINATION_DEFAULT_CLIENTID=... \\ CLOUD_SDK_CFG_DESTINATION_DEFAULT_CLIENTSECRET=... \\ CLOUD_SDK_CFG_DESTINATION_DEFAULT_URL=... \\