Updated travis configuration (#894)
* Updated travis configuration * Run license checker only in Linux * Fixed script * Fix windows test
This commit is contained in:
committed by
delvedor
parent
3942ed722c
commit
63c62b6b68
11
.travis.yml
11
.travis.yml
@ -1,7 +1,3 @@
|
||||
dist: trusty
|
||||
|
||||
sudo: required
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
@ -9,11 +5,16 @@ node_js:
|
||||
- "10"
|
||||
- "8"
|
||||
|
||||
os:
|
||||
- windows
|
||||
- linux
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
||||
script:
|
||||
- npm run license-checker && npm run test
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then npm run license-checker; fi
|
||||
- npm run test
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
||||
@ -98,10 +98,9 @@ test('Resurrect a node and handle 502/3/4 status code', t => {
|
||||
|
||||
var count = 0
|
||||
function handler (req, res) {
|
||||
res.statusCode = count < 2 ? 502 : 200
|
||||
res.statusCode = count++ < 2 ? 502 : 200
|
||||
res.setHeader('content-type', 'application/json')
|
||||
res.end(JSON.stringify({ hello: 'world' }))
|
||||
count++
|
||||
}
|
||||
|
||||
buildCluster({ handler, numberOfNodes: 2 }, ({ nodes, shutdown }) => {
|
||||
@ -123,7 +122,7 @@ test('Resurrect a node and handle 502/3/4 status code', t => {
|
||||
t.strictEqual(meta.connection.id, 'node0')
|
||||
t.strictEqual(meta.name, 'elasticsearch-js')
|
||||
t.deepEqual(meta.request, { id: idCount++ })
|
||||
if (count < 3) {
|
||||
if (count < 4) {
|
||||
t.false(meta.isAlive)
|
||||
} else {
|
||||
t.true(meta.isAlive)
|
||||
|
||||
Reference in New Issue
Block a user