Skip to content

Commit

Permalink
updated postman collections and automated-testing.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelp1986 committed Oct 30, 2023
1 parent 2eb0be1 commit bd1f30e
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 31 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/automated-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,27 @@ jobs:
name: Download Harvest Binaries
id: harvest
uses: robinraju/release-downloader@v1.8
with: # TODO: verify below
with:
repository: NASA-PDS/harvest
latest: true
tarBall: true
out-file-path: "${{ runner.temp}}"
out-file-path: "${{ runner.temp }}"
extract: true
-
name: Registry API Testing
run: |
# cd $GITHUB_WORKSPACE/docker/certs
# ./generate-certs.sh
# cd ..
# docker compose \
# --ansi never --profile int-registry-batch-loader up --detach --quiet-pull
# registry-api#296 API crashes with JVM memory error on data sets with very large labels (>1MB)
# run the query 20 times, there should not be any errors if there is enough memory allocated.
# for i in {1..20}; do
# curl --GET "localhost:8080/products?q=lidvid%20like%20%22urn:nasa:pds:mars2020_sherloc*%22"
# if [[ $? -ne 0 ]]; then
# echo "registry-api#296 failed"
# exit 1
# fi
# done
# registry-api#305 API not returning value for NAIF bundles
# curl "localhost:8080/products/urn:nasa:pds:maven.spice::5.0"
# curl "localhost:8080/products/urn:nasa:pds:mars2020.spice::6.0"
# curl "localhost:8080/products/urn:nasa:pds:insight.spice::15.0"
# curl "localhost:8080/products/urn:esa:psa:em16_spice::6.0"
cd $GITHUB_WORKSPACE/docker/certs
./generate-certs.sh
cd ..
docker compose \
--ansi never --profile int-registry-batch-loader up --detach --quiet-pull
./int-test.sh
-
name: Harvest Testing
run: |
# registry#226 As a system, I can support up to 25 simultaneous writes from Harvest
# cd $GITHUB_WORKSPACE/docker/scripts
# python harvest_stress_test.py --command "harvest_command_here" --runs 25
tag_name="${{ steps.harvest.outputs.tag_name}}"
tag_name="${{ steps.harvest.outputs.tag_name }}"
tag_name="${tag_name#v}"
echo tag_name: ${tag_name}
${{ runner.temp }}/harvest-$tag_name/bin/harvest --version
# registry#226 As a system, I can support up to 25 simultaneous writes from Harvest
# cd $GITHUB_WORKSPACE/docker/scripts
# python harvest_stress_test.py --command "harvest_command_here" --runs 25
125 changes: 122 additions & 3 deletions docker/postman/postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"info": {
"_postman_id": "23f6b1ba-f2d6-4126-9385-1cb78121b18c",
"_postman_id": "2c190a3f-684a-440a-903f-c34f795695c5",
"name": "Planetary Data System API Reference Tests Copy 2",
"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",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "11337552",
"_collection_link": "https://interstellar-satellite-406261.postman.co/workspace/My-Workspace~2ee1fece-93c6-4f38-806d-fa321e2e92d5/collection/11337552-23f6b1ba-f2d6-4126-9385-1cb78121b18c?action=share&source=collection_link&creator=11337552"
"_exporter_id": "1634405"
},
"item": [
{
Expand Down Expand Up @@ -685,6 +684,85 @@
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#349",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", () => {",
" pm.response.to.have.status(200);",
"});"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"accept": true
}
},
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/vnd.nasa.pds.pds4+json",
"type": "text"
}
],
"url": {
"raw": "{{baseUrl}}/products",
"host": [
"{{baseUrl}}"
],
"path": [
"products"
]
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#262",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 400\", () => {",
" pm.response.to.have.status(400);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/classes/collections?q=\"\"",
"host": [
"{{baseUrl}}"
],
"path": [
"",
"classes",
"collections"
],
"query": [
{
"key": "q",
"value": "\"\""
}
]
}
},
"response": []
}
]
},
Expand Down Expand Up @@ -850,6 +928,47 @@
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#296",
"event": [
{
"listen": "test",
"script": {
"exec": [
"const numOfRequests = 20",
"",
"for (let i = 0; i < numOfRequests; i++) {",
" let query = i + 1",
" pm.test(\"Query \" + query + \": status code is 200\", () => {",
" pm.response.to.have.status(200);",
" });",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/products?q=lidvid%20like%20%22urn:nasa:pds:mars2020_sherloc*%22",
"host": [
"{{baseUrl}}"
],
"path": [
"products"
],
"query": [
{
"key": "q",
"value": "lidvid%20like%20%22urn:nasa:pds:mars2020_sherloc*%22"
}
]
}
},
"response": []
}
]
},
Expand Down

0 comments on commit bd1f30e

Please sign in to comment.