Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions packages/google-cloud-firestore/tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ def verify_pipeline(query):
"""
from google.cloud.firestore_v1.base_aggregation import BaseAggregationQuery

client = query._client
if FIRESTORE_EMULATOR:
pytest.skip("skip pipeline verification on emulator")
print("skip pipeline verification on emulator")
return
if client._database != FIRESTORE_ENTERPRISE_DB:
print("pipelines only supports enterprise db")
return

def _clean_results(results):
if isinstance(results, dict):
Expand Down Expand Up @@ -126,7 +131,6 @@ def _clean_results(results):
except Exception as e:
# if we expect the query to fail, capture the exception
query_exception = e
client = query._client
pipeline = client.pipeline().create_from(query)
if query_exception:
# ensure that the pipeline uses same error as query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,13 @@ async def verify_pipeline(query):
"""
from google.cloud.firestore_v1.base_aggregation import BaseAggregationQuery

client = query._client
if FIRESTORE_EMULATOR:
pytest.skip("skip pipeline verification on emulator")
print("skip pipeline verification on emulator")
return
if client._database != FIRESTORE_ENTERPRISE_DB:
print("pipelines only supports enterprise db")
return

def _clean_results(results):
if isinstance(results, dict):
Expand Down Expand Up @@ -206,7 +211,6 @@ def _clean_results(results):
except Exception as e:
# if we expect the query to fail, capture the exception
query_exception = e
client = query._client
pipeline = client.pipeline().create_from(query)
if query_exception:
# ensure that the pipeline uses same error as query
Expand Down
Loading