Skip to content
Snippets Groups Projects
Commit 87e48007 authored by Colton Leekley-Winslow's avatar Colton Leekley-Winslow
Browse files

add postman to integration tests

parent a2f155cc
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,13 @@ case "$1-$2" in
-f test/docker-compose.yml \
run \
--rm \
--entrypoint "abao /usr/src/raml/api.raml --server=http://scitran-core:8080/api --hookfiles=/usr/src/tests/abao_test_hooks.js" \
--entrypoint "abao /usr/src/raml/api.raml --server=http://scitran-core:8080/api --hookfiles=/usr/src/tests/abao/abao_test_hooks.js" \
integration-test &&
docker-compose \
-f test/docker-compose.yml \
run \
--rm \
--entrypoint "newman run /usr/src/tests/postman/ntegration_tests.postman_collection -e /usr/src/tests/postman/local_scitran_core.postman_environment" \
integration-test ||
# set failure exit code in the event any previous commands in chain failed.
exit_code=1
......
......@@ -9,8 +9,14 @@ WORKDIR /usr/src/tests
COPY requirements-integration-test.txt requirements.txt
RUN pip install -r requirements.txt
# Install node and abao: https://github.com/cybertk/abao
# Install node for testing tools
RUN apt-get update && apt-get -y install nodejs npm && ln -s /usr/bin/nodejs /usr/bin/node
# Install abao: https://github.com/cybertk/abao
# Using our fork of abao to expand jsonschema refs
RUN apt-get update && apt-get -y install nodejs npm && ln -s /usr/bin/nodejs /usr/bin/node && npm install -g git+https://github.com/flywheel-io/abao.git#add-jsonschema-deref
RUN npm install -g git+https://github.com/flywheel-io/abao.git#add-jsonschema-deref
# Install newman for running postman collection tests from CLI
RUN npm install -g newman
ENTRYPOINT ["py.test"]
{
"id": "4451e2c5-aed1-4106-92b8-971ad6002e3a",
"name": "test",
"description": "",
"order": [
"84502070-8e56-3c5e-748a-6cf94d64581e"
],
"folders": [],
"timestamp": 1471364887347,
"owner": 0,
"public": false,
"published": false,
"requests": [
{
"id": "84502070-8e56-3c5e-748a-6cf94d64581e",
"headers": "Content-Type: application/json\n",
"url": "{{baseUri}}/users?user={{test_user}}",
"pathVariables": {},
"preRequestScript": "",
"method": "GET",
"collectionId": "4451e2c5-aed1-4106-92b8-971ad6002e3a",
"data": [],
"dataMode": "raw",
"name": "/users",
"description": "List users\n\n",
"descriptionFormat": "html",
"time": 1471364908152,
"version": 2,
"responses": [],
"tests": "tests[\"Status code is 200\"] = responseCode.code === 200;",
"currentHelper": "normal",
"helperAttributes": {},
"rawModeData": "{\"_id\":\"jane.doe@gmail.com\",\"firstname\":\"Jane\",\"lastname\":\"Doe\",\"email\":\"jane.doe@gmail.com\"}"
}
]
}
\ No newline at end of file
{
"id": "a7d51895-4029-da94-bf2f-55515105df02",
"name": "local scitran/core",
"values": [
{
"key": "baseUri",
"value": "https://docker.local.flywheel.io:8443/api",
"type": "text",
"enabled": true
},
{
"key": "test_user",
"value": "coltonlw@flywheel.io",
"type": "text",
"enabled": true
}
],
"timestamp": 1471364783708,
"synced": false,
"syncedFilename": "",
"team": null,
"isDeleted": false
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment