Skip to content

Commit

Permalink
run tests on a single instance. hard to control across many hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
esatterwhite committed Jun 3, 2017
1 parent 48c8596 commit c25f5c5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ sudo: required
services:
- docker

script: npm run test:ci
script: npm test
language: node_js
after_install:
- docker-compose -f compose/test.yml down
before_script:
- docker-compose -f compose/nats.yml up -d
after_script:
- docker-compose -f compose/nats.yml down
git:
depth: 3
node_js:
- "6"
- "7"
- "8"
addons:
code_climate:
repo_token: 248135f96061f77d2e5f78526432fd096785d2914d8f5a73a04c061000939d5d
Expand Down
4 changes: 3 additions & 1 deletion test/integration/delete-timer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ if (!process.env.TEST_HOST) {
test('skyring:api', (t) => {
let server, request;
t.test('set up skyring server', (tt) => {
server = new Server();
server = new Server({
seeds: [`${hostname}:3455`]
});
request = supertest('http://localhost:4444')
server.load().listen(4444, null, null, tt.end);
});
Expand Down
4 changes: 3 additions & 1 deletion test/integration/post-timer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function toServer(port, expect = 'hello', method = 'post', time = 1000, t){
test('skyring:api', (t) => {
let request, server
t.test('setup skyring server', (tt) => {
server = new Server();
server = new Server({
seeds: [`${hostname}:3455`]
});
request = supertest('http://localhost:3333');
server.load().listen(3333, null, null, tt.end)
});
Expand Down
2 changes: 1 addition & 1 deletion test/integration/put-timer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(!process.env.TEST_HOST) {
test('skyring:api', (t) => {
let server, request;
t.test('set up ring server', ( tt ) => {
server = new Server();
server = new Server({ seeds: [`${hostname}:3455`] });
request = supertest('http://localhost:5544');
server.load().listen(5544, null, null, tt.end);
});
Expand Down
2 changes: 1 addition & 1 deletion test/server.spec.js → test/unit/server.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const crypto = require('crypto')
, async = require('async')
, conf = require('keef')
, tap = require('tap')
, Server = require('../lib/server')
, Server = require('../../lib/server')
, test = tap.test


Expand Down
2 changes: 1 addition & 1 deletion test/timer.spec.js → test/unit/timer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const os = require('os')
, tap = require('tap')
, uuid = require('uuid')
, conf = require('keef')
, Timer = require('../lib/timer')
, Timer = require('../../lib/timer')
, test = tap.test
;

Expand Down

0 comments on commit c25f5c5

Please sign in to comment.