Skip to content

Commit 853c825

Browse files
committed
chore(firestore): skip pipeline verification tests outside enterprise db
1 parent 2e508b6 commit 853c825

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

packages/google-cloud-firestore/tests/system/test_system.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,13 @@ def verify_pipeline(query):
9494
"""
9595
from google.cloud.firestore_v1.base_aggregation import BaseAggregationQuery
9696

97+
client = query._client
9798
if FIRESTORE_EMULATOR:
98-
pytest.skip("skip pipeline verification on emulator")
99+
print("skip pipeline verification on emulator")
100+
return
101+
if client._database != FIRESTORE_ENTERPRISE_DB:
102+
print("pipelines only supports enterprise db")
103+
return
99104

100105
def _clean_results(results):
101106
if isinstance(results, dict):
@@ -126,7 +131,6 @@ def _clean_results(results):
126131
except Exception as e:
127132
# if we expect the query to fail, capture the exception
128133
query_exception = e
129-
client = query._client
130134
pipeline = client.pipeline().create_from(query)
131135
if query_exception:
132136
# ensure that the pipeline uses same error as query

packages/google-cloud-firestore/tests/system/test_system_async.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,13 @@ async def verify_pipeline(query):
174174
"""
175175
from google.cloud.firestore_v1.base_aggregation import BaseAggregationQuery
176176

177+
client = query._client
177178
if FIRESTORE_EMULATOR:
178-
pytest.skip("skip pipeline verification on emulator")
179+
print("skip pipeline verification on emulator")
180+
return
181+
if client._database != FIRESTORE_ENTERPRISE_DB:
182+
print("pipelines only supports enterprise db")
183+
return
179184

180185
def _clean_results(results):
181186
if isinstance(results, dict):
@@ -206,7 +211,6 @@ def _clean_results(results):
206211
except Exception as e:
207212
# if we expect the query to fail, capture the exception
208213
query_exception = e
209-
client = query._client
210214
pipeline = client.pipeline().create_from(query)
211215
if query_exception:
212216
# ensure that the pipeline uses same error as query

0 commit comments

Comments
 (0)