Browse Source

Add acceptance-tests docker service, and pelias cli command to run acceptance-tests test suite.

pull/29/head
John Wileczek 6 years ago
parent
commit
9b6e383ceb
  1. 2
      cmd/test.sh
  2. 17
      images/acceptance-tests/Dockerfile
  3. 7
      projects/france/docker-compose.yml
  4. 5
      projects/france/pelias.json
  5. 7
      projects/los-angeles-metro/docker-compose.yml
  6. 7
      projects/portland-metro/docker-compose.yml
  7. 7
      projects/south-africa/docker-compose.yml
  8. 2
      projects/south-africa/test_cases/search_address.json

2
cmd/test.sh

@ -3,5 +3,7 @@ set -e;
# run acceptance tests
function test_fuzzy(){ compose_run 'fuzzy-tester' -e 'docker' $@; }
function test_acceptance() { compose_run 'acceptance-tests' npm test -- -e 'docker' $@; }
register 'test' 'run' 'run fuzzy-tester test cases' test_fuzzy
register 'test' 'acceptance-tests' 'run acceptance-tests test cases' test_acceptance

17
images/acceptance-tests/Dockerfile

@ -0,0 +1,17 @@
# base image
FROM pelias/baseimage
# clone repo
RUN git clone https://github.com/pelias/acceptance-tests.git /code/pelias/acceptance-tests
# change working dir
WORKDIR /code/pelias/acceptance-tests
# consume the build variables
ARG REVISION=master
# switch to desired revision
RUN git checkout $REVISION
# install npm dependencies
RUN npm install

7
projects/france/docker-compose.yml

@ -100,3 +100,10 @@ services:
cap_add: [ "IPC_LOCK" ]
security_opt:
- seccomp=unconfined
acceptance-tests:
container_name: pelias_acceptance_tests
build: ../../images/acceptance-tests
user: "${DOCKER_USER}"
restart: "no"
volumes:
- "./pelias.json:/code/pelias.json"

5
projects/france/pelias.json

@ -18,6 +18,11 @@
}
}
},
"acceptance-tests": {
"endpoints": {
"docker": "http://api:4000/v1/"
}
},
"api": {
"textAnalyzer": "libpostal",
"services": {

7
projects/los-angeles-metro/docker-compose.yml

@ -115,3 +115,10 @@ services:
volumes:
- "./pelias.json:/code/pelias.json"
- "./test_cases:/code/pelias/fuzzy-tester/test_cases"
acceptance-tests:
container_name: pelias_acceptance_tests
build: ../../images/acceptance-tests
user: "${DOCKER_USER}"
restart: "no"
volumes:
- "./pelias.json:/code/pelias.json"

7
projects/portland-metro/docker-compose.yml

@ -118,3 +118,10 @@ services:
volumes:
- "./pelias.json:/code/pelias.json"
- "./test_cases:/code/pelias/fuzzy-tester/test_cases"
acceptance-tests:
container_name: pelias_acceptance_tests
build: ../../images/acceptance-tests
user: "${DOCKER_USER}"
restart: "no"
volumes:
- "./pelias.json:/code/pelias.json"

7
projects/south-africa/docker-compose.yml

@ -123,3 +123,10 @@ services:
volumes:
- "./pelias.json:/code/pelias.json"
- "./test_cases:/code/pelias/fuzzy-tester/test_cases"
acceptance-tests:
container_name: pelias_acceptance_tests
build: ../../images/acceptance-tests
user: "${DOCKER_USER}"
restart: "no"
volumes:
- "./pelias.json:/code/pelias.json"

2
projects/south-africa/test_cases/search_address.json

@ -1,6 +1,6 @@
{
"name": "/v1/search address",
"description": "addresses in Portland, OR",
"description": "addresses in South Africa",
"priorityThresh": 1,
"normalizers": {
"name": [

Loading…
Cancel
Save