Skip to content

Commit

Permalink
updated postman collection, postman wait for test script, and gitigno…
Browse files Browse the repository at this point in the history
…re file
  • Loading branch information
miguelp1986 committed Dec 9, 2023
1 parent b8063e5 commit d495f72
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,9 @@ test-data/

# Python virtual environment
venv/

# Certificate files
*.pem

# SRL files
*.srl
26 changes: 25 additions & 1 deletion docker/postman/postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@
"response": []
},
{
"name": "NASA-PDS/registry-api#296",
"name": "NASA-PDS/registry-api#296 API crashes with JVM memory error on data sets with very large labels (>1MB)",
"event": [
{
"listen": "test",
Expand Down Expand Up @@ -969,6 +969,25 @@
}
},
"response": []
},
{
"name": "NASA-PDS/registry-api#305 API not returning value for NAIF bundles",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/products//urn:nasa:pds:mars2020.spice::6.0",
"host": [
"{{baseUrl}}"
],
"path": [
"products",
"",
"urn:nasa:pds:mars2020.spice::6.0"
]
}
},
"response": []
}
]
},
Expand Down Expand Up @@ -1057,6 +1076,11 @@
{
"key": "baseUrl",
"value": "http://registry-api:8080"
},
{
"key": "opensearchUrl",
"value": "https://elasticsearch:9200",
"type": "string"
}
]
}
10 changes: 8 additions & 2 deletions docker/scripts/postman-waits-for-test-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,21 @@
# This script is used to wait for test data to be available in the Registry-API, before starting the Postman tests.
# ------------------------------------------------------------------------------------------------------------------

# Check if the ES_URL environment variable is set
# Check if the REG_API_URL environment variable is set
if [ -z "$REG_API_URL" ]; then
echo "Error: '$REG_API_URL' (Registry API URL) environment variable is not set. Use docker's -e option." 1>&2
exit 1
fi

# Check if the ES_URL environment variable is set
if [ -z "$ES_URL" ]; then
echo "Error: '$ES_URL' (OpenSearch URL) environment variable is not set. Use docker's -e option." 1>&2
exit 1
fi

echo "Waiting for test data to be available in the Registry-API, before starting the Postman tests..." 1>&2
sleep 240

echo "Starting Postman tests..." 1>&2
newman run /postman/postman-collection.json --env-var baseUrl=${REG_API_URL} --env-var opensearchUrl=${ES_URL}
newman run /postman/postman-collection.json --insecure --env-var baseUrl=${REG_API_URL} --env-var opensearchUrl=${ES_URL}

0 comments on commit d495f72

Please sign in to comment.