Permalink
Please sign in to comment.
Showing
with
83 additions
and 17 deletions.
- +24 −17 .circleci/config.yml
- +16 −0 Makefile
- +11 −0 docker-compose.yml
- +8 −0 test/Dockerfile
- +15 −0 test/docker-compose.yml
- +9 −0 test/integration.sh
@@ -0,0 +1,11 @@ | |||
version: '2.3' | |||
|
|||
services: | |||
server: | |||
&server | |||
image: pathwar/pathwar | |||
command: server | |||
#depends_on: | |||
# - mysql | |||
ports: | |||
- 8000 |
@@ -0,0 +1,8 @@ | |||
FROM alpine | |||
RUN apk --no-cache add curl openssl python3 make bash jq \ | |||
&& pip3 install -U pip setuptools httpie \ | |||
&& http --version \ | |||
&& jq --version | |||
ENTRYPOINT ["/bin/bash", "-c"] | |||
CMD ["sleep 5; ./integration.sh"] | |||
COPY . . |
@@ -0,0 +1,15 @@ | |||
version: '2.3' | |||
|
|||
services: | |||
server: | |||
extends: | |||
file: ../docker-compose.yml | |||
service: server | |||
|
|||
client: | |||
build: . | |||
environment: | |||
TARGET: http://server:8000 | |||
depends_on: | |||
- server | |||
tty: true |
@@ -0,0 +1,9 @@ | |||
#!/bin/bash -xe | |||
# depends on: httpie, jq | |||
|
|||
TARGET="${TARGET:-http://localhost:8000}" | |||
|
|||
http --check-status "${TARGET}"/ping | |||
token=$(http --check-status "${TARGET}"/authenticate username=integration | jq -r .token) | |||
test "$(http --check-status "${TARGET}"/session | jq -r .message)" = "no token provided" | |||
test "$(http --check-status "${TARGET}"/session "Authorization:$token" | jq -r .username)" = "integration" |
0 comments on commit
aa9c334