Skip to content

Commit

Permalink
implement tests for 484, 485, 486, 487
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdunnjpl committed Jul 23, 2024
1 parent 65e083f commit 2ce0c11
Showing 1 changed file with 144 additions and 2 deletions.
146 changes: 144 additions & 2 deletions docker/postman/postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,41 @@
},
"response": []
},
{
"name": "NASA-PDS/registry-api#484 products/{id}/members default to latest-only",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"C4438479 Status code is 200\", () => {pm.response.to.have.status(200)});",
"const content = pm.response.json();",
"const relevantHits = content.data.filter(hit => hit.properties.lid[0] === \"urn:nasa:pds:mars2020.spice:spice_kernels\")",
"pm.test(\"C4438479 Correct hits returned\", () => { pm.expect(relevantHits.length).to.eql(1) });",
"pm.test(\"C4438479 Correct data returned\", () => {pm.expect(relevantHits[0].id).to.eql(\"urn:nasa:pds:mars2020.spice:spice_kernels::3.0\")});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/products/urn:nasa:pds:mars2020.spice/members",
"host": [
"{{baseUrl}}"
],
"path": [
"products",
"urn:nasa:pds:mars2020.spice",
"members"
]
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#453 products/{id}/members/members",
"event": [
Expand Down Expand Up @@ -1882,6 +1917,43 @@
},
"response": []
},
{
"name": "NASA-PDS/registry-api#485 products/{id}/members/members default to latest-only",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"C4438481 Status code is 200\", () => { pm.response.to.have.status(200) });",
"const content = pm.response.json();",
"const relevantHits = content.data.filter(hit => hit.properties.lid[0] === \"urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020\")",
"pm.test(\"C4438481 Correct hits returned\", () => { pm.expect(relevantHits.length).to.eql(1) });",
"pm.test(\"C4438481 Correct data returned\", () => {pm.expect(relevantHits[0].id).to.eql(\"urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020::3.0\")});",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/products/urn:nasa:pds:mars2020.spice/members/members",
"host": [
"{{baseUrl}}"
],
"path": [
"products",
"urn:nasa:pds:mars2020.spice",
"members",
"members"
]
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#451/452 products/{id}/member-of",
"event": [
Expand All @@ -1903,13 +1975,48 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/products/urn:nasa:pds:mars2020.spice:spice_kernels:sclk_m2020_168_sclkscet_refit_v01.tsc::1.0/member-of",
"raw": "{{baseUrl}}/products/urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020/member-of",
"host": [
"{{baseUrl}}"
],
"path": [
"products",
"urn:nasa:pds:mars2020.spice:spice_kernels:sclk_m2020_168_sclkscet_refit_v01.tsc::1.0",
"urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020",
"member-of"
]
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#451/486 products/{id}/member-of default to latest-only",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"C4438482 Status code is 200\", () => {pm.response.to.have.status(200)});",
"const content = pm.response.json();",
"const relevantHits = content.data.filter(hit => hit.properties.lid[0] === \"urn:nasa:pds:mars2020.spice:spice_kernels\")",
"pm.test(\"C4438482 Correct hits returned\", () => { pm.expect(relevantHits.length).to.eql(1) });",
"pm.test(\"C4438482 Correct data returned\", () => {pm.expect(relevantHits[0].id).to.eql(\"urn:nasa:pds:mars2020.spice:spice_kernels::3.0\")});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/products/urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020/member-of",
"host": [
"{{baseUrl}}"
],
"path": [
"products",
"urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020",
"member-of"
]
}
Expand Down Expand Up @@ -1949,6 +2056,41 @@
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#487 products/{id}/member-of/member-of default to latest-only",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"C4438483 Status code is 200\", () => {pm.response.to.have.status(200)});",
"const content = pm.response.json();",
"const relevantHits = content.data.filter(hit => hit.properties.lid[0] === \"urn:nasa:pds:mars2020.spice:spice_kernels\")",
"pm.test(\"C4438483 Correct hits returned\", () => { pm.expect(relevantHits.length).to.eql(1) });",
"pm.test(\"C4438483 Correct data returned\", () => {pm.expect(relevantHits[0].id).to.eql(\"urn:nasa:pds:mars2020.spice:spice_kernels::3.0\")});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/products/urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020/member-of",
"host": [
"{{baseUrl}}"
],
"path": [
"products",
"urn:nasa:pds:mars2020.spice:spice_kernels:mk_m2020",
"member-of"
]
}
},
"response": []
}
]
},
Expand Down

0 comments on commit 2ce0c11

Please sign in to comment.