Skip to content

Commit 7d2b79f

Browse files
committed
test(mongodb): remove env dependency; use fixed instance_id matching cassette
1 parent 692f478 commit 7d2b79f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

scaleway/scaleway/mongodb/v1/tests/test_custom_api.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
from datetime import datetime, timedelta, timezone
32

43
import pytest
@@ -16,9 +15,8 @@ def test_create_snapshot_with_naive_expires_at_vcr() -> None:
1615
client = initialize_client_test()
1716
api = MongodbUtilsV1API(client, bypass_validation=True)
1817

19-
instance_id = os.environ.get("SCW_TEST_MONGODB_INSTANCE_ID")
20-
if not instance_id:
21-
pytest.skip("SCW_TEST_MONGODB_INSTANCE_ID not set for recording")
18+
# Fixed value to match cassette; record once locally, then CI replays
19+
instance_id = "00000000-0000-0000-0000-000000000000"
2220

2321
# Naive datetime should be handled as UTC by the utils API
2422
naive_dt = datetime.now().replace(tzinfo=None) + timedelta(days=1)

0 commit comments

Comments
 (0)