Skip to content

Commit 2a3f60e

Browse files
chore(adms): scope pytest config to ADMS and extract mount-path constant
- Revert global [tool.pytest.ini_options] integration marker description and remove asyncio_mode=auto so the change does not leak into other modules' test runs. - Extract /etc/secrets/appfnd and CLOUD_SDK_CFG as module-level constants in adms/config.py for consistency with the existing _SERVICE_PATH / _ADMIN_SERVICE_PATH constants.
1 parent a8300be commit 2a3f60e

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ dev = [
6565

6666
[tool.pytest.ini_options]
6767
markers = [
68-
"integration: marks tests as integration tests (requires a running HDM server or set CLOUD_SDK_ADMS_INTEGRATION_URL)",
68+
"integration: marks tests as integration tests (requires Docker)",
6969
]
70-
asyncio_mode = "auto"
7170

7271
[tool.coverage.run]
7372
source = ["src"]

src/sap_cloud_sdk/adms/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
from sap_cloud_sdk.adms.exceptions import ConfigError
2727

2828
_DEFAULT_INSTANCE = "default"
29+
_SECRET_MOUNT_BASE = "/etc/secrets/appfnd"
30+
_ENV_VAR_BASE = "CLOUD_SDK_CFG"
2931
_SERVICE_PATH = "/odata/v4/DocumentService"
3032
_ADMIN_SERVICE_PATH = "/odata/v4/AdminService"
3133
_CONFIG_SERVICE_PATH = "/odata/v4/ConfigurationService"
@@ -104,8 +106,8 @@ def load_from_env_or_mount(instance: str | None = None) -> AdmsConfig:
104106
raw = _BindingData()
105107
try:
106108
read_from_mount_and_fallback_to_env_var(
107-
base_volume_mount="/etc/secrets/appfnd",
108-
base_var_name="CLOUD_SDK_CFG",
109+
base_volume_mount=_SECRET_MOUNT_BASE,
110+
base_var_name=_ENV_VAR_BASE,
109111
module="adms",
110112
instance=instance,
111113
target=raw,

0 commit comments

Comments
 (0)