Commit 330dc707 authored by Andrew Newdigate's avatar Andrew Newdigate

WIP isolated tests

parent fc3a4df6
......@@ -4,5 +4,3 @@ output
.settings
.idea
.data
test
scripts/graphs
......@@ -12,8 +12,8 @@ COPY modules/ modules/
COPY shared/ shared/
RUN sed 's#http://beta-internal:4873/#http://10.0.0.140:4873/#g' -ibak npm-shrinkwrap.json
RUN npm install --verbose --registry http://10.0.0.140:4873/
RUN npm install --registry http://10.0.0.140:4873/
COPY . .
# Horrible hack for now
CMD ["nodemon", "web"]
CMD ["node", "web"]
FROM node:4
RUN npm install -g node-gyp
RUN apt-get install comerr-dev
RUN mkdir /src
WORKDIR /src
COPY package.json package.json
COPY npm-shrinkwrap.json npm-shrinkwrap.json
COPY modules/ modules/
COPY shared/ shared/
RUN sed 's#http://beta-internal:4873/#http://10.0.0.140:4873/#g' -ibak npm-shrinkwrap.json
RUN npm install --registry http://10.0.0.140:4873/
COPY . .
# Horrible hack for now
CMD ["node", "web"]
mongo1:
build: config/docker-tests/mongo
redistest1:
image: redis:3.0.3
restart: 'always'
entrypoint: [ "/usr/local/bin/redis-server", "--bind", "0.0.0.0", "--port", "6379", "--maxclients", "200"]
redistest2:
image: redis:3.0.3
restart: 'always'
links:
- redistest1
entrypoint: [ "/usr/local/bin/redis-server", "--bind", "0.0.0.0", "--port", "6380", "--slaveof", "redistest1", "6379", "--maxclients", "200"]
sentineltest1:
build: config/docker-tests/sentinel
restart: 'always'
links:
- redistest1
- redistest2
test:
build: .
links:
- mongo1
- mongo2
- mongo3
- redis1
- redis2
- sentinel1
- elasticsearch
- neo4j
- redistest1
- redistest2
- sentineltest1
extra_hosts:
- "beta-internal:10.0.0.140"
environment:
SKIP_BADGER_TESTS: 1
entrypoint: [ "./node_modules/.bin/gulp", "test-docker"]
test-node4:
build: .
dockerfile: Dockerfile-node4
links:
- mongo1
- redistest1
- sentineltest1
extra_hosts:
- "beta-internal:10.0.0.140"
environment:
DEBUG: "gitter:*"
entrypoint: [ "/bin/bash", "-c", "cd /src; ./node_modules/.bin/gulp test-docker"]
SKIP_BADGER_TESTS: 1
entrypoint: [ "./node_modules/.bin/gulp", "test-docker"]
......@@ -156,7 +156,6 @@ makeTestTasks('test-docker', function(name, files) {
TAP_FILE: 'output/test-reports/' + name + '.tap',
XUNIT_FILE: 'output/test-reports/' + name + '.xml',
NODE_ENV: 'test-docker',
DEBUG: 'gitter:*',
Q_DEBUG: 1,
BLUEBIRD_DEBUG: 1
}
......
#!/bin/bash -eu
ISOLATED_UNIQ_ID=${BUILD_NUMBER:-$(date +"%Y-%m-%dT%H:%M:%S")}
JOB=${TEST_JOB-test}
function finish {
docker-compose -p "webapp-${ISOLATED_UNIQ_ID}" -f docker-compose.test.yml stop
docker-compose -p "webapp-${ISOLATED_UNIQ_ID}" -f docker-compose.test.yml rm -f
}
trap finish EXIT
docker-compose -p "webapp-${ISOLATED_UNIQ_ID}" -f docker-compose.test.yml build mongo1 sentineltest1 "${JOB}"
docker-compose -p "webapp-${ISOLATED_UNIQ_ID}" -f docker-compose.test.yml run "${JOB}"
Markdown is supported
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