Commit cd085f23 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

test docker deployment

parent b2bbfe85
......@@ -22,6 +22,21 @@ test-python:
]
test-docker-compose:
image: registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:latest
services:
- registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:dind
needs: []
stage: test
script:
- apt-get update && apt install -y jq
- ./test_docker_compose.sh
artifacts:
paths:
- log
expire_in: 1 week
#test-backend-image:
# image: registry-gitlab.pasteur.fr/dsi-tools/docker-images/docker:latest
# services:
......
version: '3.4'
services:
celery:
volumes:
- ./jass/test/data_test1:/data
back:
volumes:
- ./jass/test/data_test1:/data
\ No newline at end of file
#!/usr/bin/env bash
docker-compose -f docker-compose.yaml -f docker-compose.test.yaml up -d --build
curl -I http://0.0.0.0:3000/ \
1> log/01-index.log \
2> log/01-index.err
if [ "$(cat log/01-index.log | grep "200 OK" | wc -l)" == "0" ]; then exit 01; fi
curl -I http://0.0.0.0:3000/phenotypes \
1> log/02-phenotypes.log \
2> log/02-phenotypes.err
if [ "$(cat log/02-*.log | grep "200 OK" | wc -l)" == "0" ]; then exit 02; fi
curl --location --request POST 'http://0.0.0.0:8080/api/projects' \
--header 'Accept: text/html' \
--header 'Content-Type: application/json' \
--data-raw '{"phenotypeID": ["z_DISNEY_POCAHONT", "z_DISNEY_RATATOUY"]}' \
-o log/03-post-phenotypes.json \
1> log/03-post-phenotypes.log \
2> log/03-post-phenotypes.err
PROJECT_ID=$(jq .id log/03-post-phenotypes.json | sed 's/\"//g')
if [ ! -d "projects/project_$PROJECT_ID" ]; then
exit 03
fi
curl -I http://0.0.0.0:3000/projects/$PROJECT_ID \
1> log/04-project.log \
2> log/04-project.err
if [ "$(cat log/04-*.log | grep "200 OK" | wc -l)" == "0" ]; then exit 04; fi
curl http://0.0.0.0:8080/api/projects/$PROJECT_ID/globalmanhattan \
-o log/05-globalmanhattan.png \
1> log/05-globalmanhattan.log \
2> log/05-globalmanhattan.err
if [ ! -s log/05-*.png ]; then exit 05; fi
curl http://0.0.0.0:8080/api/projects/$PROJECT_ID/quadrant \
-o log/06-quadrant.png \
1> log/06-quadrant.log \
2> log/06-quadrant.err
if [ ! -s log/06-*.png ]; then exit 06; fi
curl http://0.0.0.0:8080/api/projects/$PROJECT_ID/genome_full \
-o log/07-genome_full.csv \
1> log/07-genome_full.log \
2> log/07-genome_full.err
if [ ! -s log/07-*.csv ]; then exit 07; fi
exit 0
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment