Skip to content

Commit db3fcbd

Browse files
author
Theodore Cowan
committed
Additional tests to cover different node roles for nodesToHost of BaseConnectionPool
1 parent 271dc14 commit db3fcbd

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

test/unit/connection-pool.test.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,13 @@ test('API', t => {
297297
http: {
298298
publish_address: '127.0.0.1:9201'
299299
},
300-
roles: ['master', 'data', 'ingest']
300+
roles: ['master', 'data', 'ingest', 'ml']
301+
},
302+
a3: {
303+
http: {
304+
publish_address: '127.0.0.1:9201'
305+
},
306+
roles: []
301307
}
302308
}
303309

@@ -317,6 +323,15 @@ test('API', t => {
317323
master: true,
318324
data: true,
319325
ingest: true,
326+
ml: true
327+
}
328+
}, {
329+
url: new URL('http://127.0.0.1:9201'),
330+
id: 'a3',
331+
roles: {
332+
master: false,
333+
data: false,
334+
ingest: false,
320335
ml: false
321336
}
322337
}])

0 commit comments

Comments
 (0)