Skip to content
Permalink
Browse files

test: first API tests

  • Loading branch information...
moul committed May 23, 2019
1 parent 8c55ca7 commit afc5a81c086862f407025b495fd99aa58cd52dea
Showing with 2,940 additions and 2,909 deletions.
  1. +1 −2 .circleci/config.yml
  2. +3 −1 .dockerignore
  3. +1 −0 .gitignore
  4. +10 −9 Makefile
  5. +3 −0 docker-compose.yml
  6. +0 −8 test/Dockerfile
  7. +0 −15 test/docker-compose.yml
  8. +0 −9 test/integration.sh
  9. +2,909 −2,865 web/package-lock.json
  10. +1 −0 web/package.json
  11. +12 −0 web/src/api/api.spec.js
@@ -57,8 +57,7 @@ jobs:
- run: /tmp/retry -m 3 apk --no-cache add curl openssl make bash
- setup_remote_docker:
docker_layer_caching: true
- run: /tmp/retry -m 3 docker build -t pathwar/pathwar .
- run: /tmp/retry -m 3 docker build -t pathwar/pathwar:test ./test
- run: /tmp/retry -m 3 make integration.build
- run: /tmp/retry -m 3 make integration.run
- run: /tmp/retry -m 3 make integration.run # yes, again
- run: docker-compose logs
@@ -8,4 +8,6 @@ test/
.#*
.*~
Dockerfile
vendor/
vendor/
.gitignore
.dockerignore
@@ -1,5 +1,6 @@
.env

node_modules
vendor/
*~
*#
@@ -125,17 +125,18 @@ swagger.yaml: $(PROTOS)
.PHONY: docker.build
docker.build:
docker build -t pathwar/pathwar:latest .
docker build -t pathwar/pathwar:test ./test

.PHONY: integration.run
integration.run:
docker-compose -f ./docker-compose.yml -f ./test/docker-compose.yml up -d --no-build server
docker-compose -f ./docker-compose.yml -f ./test/docker-compose.yml run --no-deps client
docker-compose -f ./docker-compose.yml -f ./test/docker-compose.yml down

.PHONY: integration
integration:
./test/integration.sh
integration: integration.build integration.run

.PHONY: integration.build
integration.build:
docker-compose build server web

.PHONY:integration.run
integration.run:
docker-compose up -d --no-build server
docker-compose run web npm test

.PHONY: lint
lint:
@@ -32,3 +32,6 @@ services:
- 3001:3001
environment:
- NODE_ENV=development
- API_TARGET=server:8000
links:
- server

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit afc5a81

Please sign in to comment.
You can’t perform that action at this time.