Skip to content

Commit e37ca5a

Browse files
committed
SNOW-2306184: config refactor - e2e fix attempt 2
1 parent 0019bde commit e37ca5a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests_e2e/conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,14 @@ def isolate_environment_variables(monkeypatch):
117117
"""
118118
Clear Snowflake-specific environment variables that could interfere with e2e tests.
119119
This ensures tests run in a clean environment and only use the config files they specify.
120+
Exception: Keep INTEGRATION connection vars for e2e testing.
120121
"""
121-
# Clear all SNOWFLAKE_CONNECTIONS_* environment variables
122+
# Clear all SNOWFLAKE_CONNECTIONS_* environment variables except INTEGRATION
122123
for env_var in list(os.environ.keys()):
123124
if env_var.startswith(("SNOWFLAKE_CONNECTIONS_", "SNOWSQL_")):
124-
monkeypatch.delenv(env_var, raising=False)
125+
# Preserve all INTEGRATION connection environment variables
126+
if not env_var.startswith("SNOWFLAKE_CONNECTIONS_INTEGRATION_"):
127+
monkeypatch.delenv(env_var, raising=False)
125128

126129

127130
def _create_venv(tmp_dir: Path) -> None:

0 commit comments

Comments
 (0)