Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
FIRESTORE_OTHER_DB = os.environ.get("SYSTEM_TESTS_DATABASE", "system-tests-named-db")
FIRESTORE_ENTERPRISE_DB = os.environ.get("ENTERPRISE_DATABASE", "enterprise-db-native")

# run all tests against default database, and a named database
TEST_DATABASES = [None, FIRESTORE_OTHER_DB]
# To eliminate test duplication, we use the default database for the
# core test suites. The named database is ONLY tested explicitly in dedicated
# routing tests to prove path construction works.
TEST_DATABASES = [None]
TEST_DATABASES_W_ENTERPRISE = TEST_DATABASES + [FIRESTORE_ENTERPRISE_DB]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
FIRESTORE_CREDS,
FIRESTORE_EMULATOR,
FIRESTORE_ENTERPRISE_DB,
FIRESTORE_OTHER_DB,
FIRESTORE_PROJECT,
MISSING_DOCUMENT,
RANDOM_ID_REGEX,
Expand Down Expand Up @@ -1064,7 +1065,9 @@ def check_snapshot(snapshot, document, data, write_result):
assert snapshot.update_time == write_result.update_time


@pytest.mark.parametrize("database", TEST_DATABASES, indirect=True)
# We explicitly parameterize test_document_get with FIRESTORE_OTHER_DB to test
# named database path routing natively, without inflating the rest of the test suite.
@pytest.mark.parametrize("database", [None, FIRESTORE_OTHER_DB], indirect=True)
def test_document_get(client, cleanup, database):
now = datetime.datetime.now(tz=datetime.timezone.utc)
document_id = "for-get" + UNIQUE_RESOURCE_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
FIRESTORE_CREDS,
FIRESTORE_EMULATOR,
FIRESTORE_ENTERPRISE_DB,
FIRESTORE_OTHER_DB,
FIRESTORE_PROJECT,
MISSING_DOCUMENT,
RANDOM_ID_REGEX,
Expand Down Expand Up @@ -1046,7 +1047,9 @@ def check_snapshot(snapshot, document, data, write_result):
assert snapshot.update_time == write_result.update_time


@pytest.mark.parametrize("database", TEST_DATABASES, indirect=True)
# We explicitly parameterize test_document_get with FIRESTORE_OTHER_DB to test
# named database path routing natively, without inflating the rest of the test suite.
@pytest.mark.parametrize("database", [None, FIRESTORE_OTHER_DB], indirect=True)
async def test_document_get(client, cleanup, database):
now = datetime.datetime.now(tz=datetime.timezone.utc)
document_id = "for-get" + UNIQUE_RESOURCE_ID
Expand Down
Loading