Skip to content

Commit fc1e4ff

Browse files
committed
fix(tests): only enforce normalization guard in record mode
The normalization guard was firing during cassette playback in CI, breaking gooddata-fdw tests which don't call configure_normalization(). The guard only matters when recording (OVERWRITE env var set), since playback doesn't need normalization — cassettes are already normalized. risk: low
1 parent 17106a1 commit fc1e4ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/tests-support/src/tests_support/vcrpy_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _normalize_uri(uri: str) -> str:
224224

225225

226226
def custom_before_request(request, headers_str: str = HEADERS_STR):
227-
if not _normalization_configured:
227+
if not _normalization_configured and "OVERWRITE" in os.environ:
228228
raise RuntimeError(
229229
"VCR normalization not configured. "
230230
"Ensure your test fixture depends on 'test_config' (directly or transitively) "
@@ -251,7 +251,7 @@ def custom_before_response(
251251
non_static_headers: list[str] | None = None,
252252
placeholder: list[str] | None = None,
253253
):
254-
if not _normalization_configured:
254+
if not _normalization_configured and "OVERWRITE" in os.environ:
255255
raise RuntimeError(
256256
"VCR normalization not configured. "
257257
"Ensure your test fixture depends on 'test_config' (directly or transitively) "

0 commit comments

Comments
 (0)