Skip to content

Commit ab61594

Browse files
authored
fix(agentgateway): use CLOUD_SDK_CFG_AGW_DEFAULT_* env vars for integration tests (#167)
1 parent 6e4de9d commit ab61594

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

.env_integration_tests.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ CLOUD_SDK_CFG_ADMS_DEFAULT_URL=https://your-tenant.accounts.ondemand.com
3434
CLOUD_SDK_CFG_ADMS_DEFAULT_URI=https://your-adm-host.cfapps.eu20.hana.ondemand.com
3535
CLOUD_SDK_CFG_ADMS_DEFAULT_RESOURCE=urn:sap:identity:application:provider:name:your-adm-app-name
3636

37-
APPFND_CONHOS_LANDSCAPE=your-landscape-here
38-
TENANT_SUBDOMAIN=your-tenant-subdomain-here
37+
CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN=your-tenant-subdomain-here
38+
CLOUD_SDK_CFG_AGW_DEFAULT_LANDSCAPE=your-landscape-here
3939
AGW_USER_TOKEN=your-user-jwt-here
4040

4141
# AI Core — required for Traceloop/LangGraph integration tests

tests/agentgateway/integration/conftest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ def agw_client() -> AgentGatewayClient:
2121
"""Create an AgentGatewayClient from environment variables."""
2222
_setup_cloud_mode()
2323

24-
tenant_subdomain = os.environ.get("TENANT_SUBDOMAIN")
24+
tenant_subdomain = os.environ.get("CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN")
2525
if not tenant_subdomain:
26-
pytest.fail("TENANT_SUBDOMAIN environment variable is not set")
26+
pytest.fail("CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN environment variable is not set")
27+
28+
landscape = os.environ.get("CLOUD_SDK_CFG_AGW_DEFAULT_LANDSCAPE")
29+
if landscape:
30+
os.environ.setdefault("APPFND_CONHOS_LANDSCAPE", landscape)
2731

2832
try:
2933
return create_client(tenant_subdomain=tenant_subdomain)

tests/agentgateway/integration/test_agw_bdd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
Run against a live BTP tenant:
44
5-
APPFND_CONHOS_LANDSCAPE=<landscape> \\
6-
TENANT_SUBDOMAIN=<tenant-subdomain> \\
5+
CLOUD_SDK_CFG_AGW_DEFAULT_TENANT_SUBDOMAIN=<tenant-subdomain> \\
6+
CLOUD_SDK_CFG_AGW_DEFAULT_LANDSCAPE=<landscape> \\
77
CLOUD_SDK_CFG_DESTINATION_DEFAULT_CLIENTID=... \\
88
CLOUD_SDK_CFG_DESTINATION_DEFAULT_CLIENTSECRET=... \\
99
CLOUD_SDK_CFG_DESTINATION_DEFAULT_URL=... \\

0 commit comments

Comments
 (0)