Skip to content

Commit c56c37b

Browse files
authored
Merge 0ee4fb3 into 10587a8
2 parents 10587a8 + 0ee4fb3 commit c56c37b

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

cumulus_lambda_functions/uds_api/dapa/granules_dapa_query_es.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ def get_single_granule(self, granule_id):
172172
'size': 1,
173173
'sort': [{'id': {'order': 'asc'}}],
174174
'query': {'bool': {'must': [{
175-
'term': {'id': granule_id}
175+
'term': {'id': granule_id}}, {
176+
'term': {'collection': self.__collection_id},
176177
}]}}
177178
}
178179
LOGGER.debug(f'granules_query_dsl: {granules_query_dsl}')

tests/integration_tests/test_uds_api.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,23 @@ def test_single_granule_get(self):
233233

234234
return
235235

236+
237+
def test_single_granule_get_temp(self):
238+
# post_url = f'{self.uds_url}collections/urn:nasa:unity:uds_local_test:DEV1:CHRP_16_DAY_REBIN___10/items/urn:nasa:unity:uds_local_test:DEV1:CHRP_16_DAY_REBIN___10:SNDR.SS1330.CHIRP.20230101T0000.m06.g001.L1_J1.std.v02_48.G.200101070318_REBIN'
239+
post_url = f'{self.uds_url}collections/urn:nasa:unity:uds_local_test:DEV1:CHRP_16_DAY_REBIN___11/items/urn:nasa:unity:uds_local_test:DEV1:CHRP_16_DAY_REBIN___10:SNDR.SS1330.CHIRP.20230101T0000.m06.g001.L1_J1.std.v02_48.G.200101070318_REBIN'
240+
headers = {
241+
'Authorization': f'Bearer {self.bearer_token}',
242+
}
243+
print(post_url)
244+
query_result = requests.get(url=post_url,
245+
headers=headers,
246+
)
247+
self.assertEqual(query_result.status_code, 200, f'wrong status code. {query_result.text}')
248+
response_json = json.loads(query_result.text)
249+
print(json.dumps(response_json))
250+
251+
return
252+
236253
def test_create_new_collection(self):
237254
post_url = f'{self.uds_url}collections/' # MCP Dev
238255
headers = {

0 commit comments

Comments
 (0)