Skip to content

Commit 6d04392

Browse files
al-niessnerAl Niessnerthomas loubrieu
authored
Update postman_collection.json (#470)
* update registry testing First, modified .env and docker-compose to allow the user to move from a docker volume to a disk with more space. Second, added 8 tests for "exists" capability in the registry-api query language * Update postman_collection.json Change the way wildcarding is expressed. * Update postman_collection.json Put * back in because of too happy to delete. --------- Co-authored-by: Al Niessner <Al.Niessner@xxx.xxx> Co-authored-by: thomas loubrieu <thomas.loubrieu@jpl.nasa.gov>
1 parent 5f6b16b commit 6d04392

1 file changed

Lines changed: 73 additions & 10 deletions

File tree

docker/postman/postman_collection.json

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"info": {
3-
"_postman_id": "92a78754-20ad-4377-8ee1-cc4c26691839",
4-
"name": "Planetary Data System API Reference Tests Copy 18",
3+
"_postman_id": "1a655299-afbc-4a5a-bc81-e63ca981722f",
4+
"name": "Planetary Data System API Reference Tests Copy 20",
55
"description": "Federated PDS API which provides actionable end points standardized\nbetween the different nodes.\n\n\nContact Support:\n Email: pds-operator@jpl.nasa.gov",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
77
"_exporter_id": "11337552",
8-
"_collection_link": "https://go.postman.co/collection/11337552-92a78754-20ad-4377-8ee1-cc4c26691839?source=collection_link"
8+
"_collection_link": "https://go.postman.co/collection/11337552-1a655299-afbc-4a5a-bc81-e63ca981722f?source=collection_link"
99
},
1010
"item": [
1111
{
@@ -2236,7 +2236,8 @@
22362236
""
22372237
],
22382238
"type": "text/javascript",
2239-
"packages": {}
2239+
"packages": {},
2240+
"requests": {}
22402241
}
22412242
}
22422243
],
@@ -3631,7 +3632,7 @@
36313632
"method": "GET",
36323633
"header": [],
36333634
"url": {
3634-
"raw": "{{baseUrl}}/products?q=(\".*logical_identifier\" exists)",
3635+
"raw": "{{baseUrl}}/products?q=(*logical_identifier exists)",
36353636
"host": [
36363637
"{{baseUrl}}"
36373638
],
@@ -3641,7 +3642,7 @@
36413642
"query": [
36423643
{
36433644
"key": "q",
3644-
"value": "(\".*logical_identifier\" exists)",
3645+
"value": "(*logical_identifier exists)",
36453646
"description": "find all documents, which should be all, that have a logical identifier defined"
36463647
}
36473648
]
@@ -3732,7 +3733,7 @@
37323733
"method": "GET",
37333734
"header": [],
37343735
"url": {
3735-
"raw": "{{baseUrl}}/products?q=(\".*illogical_identifier\" exists)",
3736+
"raw": "{{baseUrl}}/products?q=(*illogical_identifier exists)",
37363737
"host": [
37373738
"{{baseUrl}}"
37383739
],
@@ -3742,7 +3743,7 @@
37423743
"query": [
37433744
{
37443745
"key": "q",
3745-
"value": "(\".*illogical_identifier\" exists)"
3746+
"value": "(*illogical_identifier exists)"
37463747
}
37473748
]
37483749
}
@@ -3830,7 +3831,7 @@
38303831
"method": "GET",
38313832
"header": [],
38323833
"url": {
3833-
"raw": "{{baseUrl}}/products?q=not (\".*illogical_identifier\" exists)",
3834+
"raw": "{{baseUrl}}/products?q=not (*illogical_identifier exists)",
38343835
"host": [
38353836
"{{baseUrl}}"
38363837
],
@@ -3840,7 +3841,7 @@
38403841
"query": [
38413842
{
38423843
"key": "q",
3843-
"value": "not (\".*illogical_identifier\" exists)"
3844+
"value": "not (*illogical_identifier exists)"
38443845
}
38453846
]
38463847
}
@@ -3970,6 +3971,68 @@
39703971
}
39713972
},
39723973
"response": []
3974+
},
3975+
{
3976+
"name": "NASA-PDS/registry-api#406 search property wildcard on eq operator",
3977+
"event": [
3978+
{
3979+
"listen": "test",
3980+
"script": {
3981+
"exec": [
3982+
"// Test that response status code is 200",
3983+
"pm.test(\"Status code is 200\", function () {",
3984+
" pm.response.to.have.status(200);",
3985+
"});",
3986+
"",
3987+
"// Test that response body is a valid JSON object",
3988+
"pm.test(\"Response body is valid JSON object\", function () {",
3989+
" let jsonData;",
3990+
" pm.expect(function () {",
3991+
" jsonData = pm.response.json();",
3992+
" }).to.not.throw();",
3993+
" pm.expect(jsonData).to.be.an(\"object\");",
3994+
"});",
3995+
"",
3996+
"// Test that summary.hits exists and is a number",
3997+
"pm.test(\"summary.hits exists and is a number\", function () {",
3998+
" const jsonData = pm.response.json();",
3999+
" pm.expect(jsonData).to.have.nested.property(\"summary.hits\");",
4000+
" pm.expect(jsonData.summary.hits).to.be.a(\"number\");",
4001+
"});",
4002+
"",
4003+
"// Test that 'summary.hits' is exactly zero",
4004+
"pm.test(\"'summary.hits' is exactly zero\", function () {",
4005+
" var jsonData = pm.response.json();",
4006+
" pm.expect(jsonData.summary.hits).to.eql(0);",
4007+
"});",
4008+
""
4009+
],
4010+
"type": "text/javascript",
4011+
"packages": {},
4012+
"requests": {}
4013+
}
4014+
}
4015+
],
4016+
"request": {
4017+
"method": "GET",
4018+
"header": [],
4019+
"url": {
4020+
"raw": "{{baseUrl}}/products?q=(.*pds:logical_identifier eq \"urn:nasa:pds:insight_rad:data_calibrated:hp3_rad_cal_00390_20200101_120222\")",
4021+
"host": [
4022+
"{{baseUrl}}"
4023+
],
4024+
"path": [
4025+
"products"
4026+
],
4027+
"query": [
4028+
{
4029+
"key": "q",
4030+
"value": "(.*pds:logical_identifier eq \"urn:nasa:pds:insight_rad:data_calibrated:hp3_rad_cal_00390_20200101_120222\")"
4031+
}
4032+
]
4033+
}
4034+
},
4035+
"response": []
39734036
}
39744037
]
39754038
},

0 commit comments

Comments
 (0)