Skip to content

Commit

Permalink
pass bucket correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Akopti8 committed May 15, 2024
1 parent d3e7b7f commit 216ff2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
run: |
touch .env
echo INIT_AUTH=0 >> .env
echo S3_BUCKET=${{ secrets.S3_BUCKET }} >> .env
echo S3_MOCK=0 >> .env
- name: 'Create .env.json file'
run: |
Expand All @@ -40,17 +41,14 @@ jobs:

- name: Check if all 2 containers are alive
run: |
sleep 25s
# sleep 25s
docker ps -a
if [ $(docker ps | grep mcat-ras- | wc -l) -lt 2 ]
then
echo "Less than 2 docker services alive."
exit 1
fi
- name: Show API container logs
run: docker logs mcat-ras-api

- name: Show Newman results
run: |
sleep 50s
Expand Down
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ services:
- ./.env
networks:
- app_network

newman:
image: postman/newman:alpine
container_name: mcat-ras-newman
entrypoint: [ "" ]
command: >
sh -c "sleep 30s &&
newman run /app/testing/postman_collection.json
--env-var url=api:5600
--env-var bucket=${S3_BUCKET}"
newman run /app/testing/postman_collection.json --env-var bucket=${S3_BUCKET}"
volumes:
- ./testing:/app/testing
depends_on:
- "api"
- api
environment:
- S3_BUCKET=${S3_BUCKET}
networks:
Expand Down
17 changes: 6 additions & 11 deletions testing/postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "http://{{url}}/forcingdata?definition_file=mcat-ras-testing/Example_Projects/2D Unsteady Flow Hydraulics/BaldEagleCrkMulti2D/BaldEagleDamBrk.prj&bucket={{bucket}}",
"raw": "{{url}}/forcingdata?definition_file=mcat-ras-testing/Example_Projects/2D Unsteady Flow Hydraulics/BaldEagleCrkMulti2D/BaldEagleDamBrk.prj&bucket={{bucket}}",
"protocol": "http",
"host": [
"{{url}}"
Expand Down Expand Up @@ -149,7 +149,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "http://{{url}}/forcingdata?definition_file=mcat-ras-testing/mocked-data/bare-minimum-project/BaldEagleDamBrk.prj&bucket={{bucket}}",
"raw": "{{url}}/forcingdata?definition_file=mcat-ras-testing/mocked-data/bare-minimum-project/BaldEagleDamBrk.prj&bucket={{bucket}}",
"protocol": "http",
"host": [
"{{url}}"
Expand Down Expand Up @@ -191,7 +191,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "http://{{url}}/forcingdata?definition_file=mcat-ras-testing/mocked-data/no-flow-file/BaldEagleDamBrk.prj&bucket={{bucket}}",
"raw": "{{url}}/forcingdata?definition_file=mcat-ras-testing/mocked-data/no-flow-file/BaldEagleDamBrk.prj&bucket={{bucket}}",
"protocol": "http",
"host": [
"{{url}}"
Expand Down Expand Up @@ -265,7 +265,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "http://{{url}}/forcingdata?definition_file=mcat-ras-testing/Example_Projects/not-exist.prj&bucket={{bucket}}",
"raw": "{{url}}/forcingdata?definition_file=mcat-ras-testing/Example_Projects/not-exist.prj&bucket={{bucket}}",
"protocol": "http",
"host": [
"{{url}}"
Expand Down Expand Up @@ -360,7 +360,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "http://{{url}}/isamodel?definition_file=mcat-ras-testing/Example_Projects/2D Unsteady Flow Hydraulics/BaldEagleCrkMulti2D/GISData/MainChannelBanks.prj&bucket={{bucket}}",
"raw": "{{url}}/isamodel?definition_file=mcat-ras-testing/Example_Projects/2D Unsteady Flow Hydraulics/BaldEagleCrkMulti2D/GISData/MainChannelBanks.prj&bucket={{bucket}}",
"protocol": "http",
"host": [
"{{url}}"
Expand Down Expand Up @@ -413,12 +413,7 @@
"variable": [
{
"key": "url",
"value": "localhost:5600",
"type": "string"
},
{
"key": "bucket",
"value": "",
"value": "api:5600",
"type": "string"
}
]
Expand Down

0 comments on commit 216ff2f

Please sign in to comment.