Updated test

This commit is contained in:
delvedor
2019-02-19 08:31:09 +01:00
parent 98e8bbd63d
commit bcf895294b
3 changed files with 75 additions and 6 deletions

View File

@ -496,3 +496,30 @@ test('Extend client APIs', t => {
t.end()
})
test('Elastic cloud config', t => {
t.plan(1)
const client = new Client({
cloud: {
// 'localhost$abcd$efgh'
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
username: 'elastic',
password: 'changeme'
}
})
const pool = client.connectionPool
t.match(pool.connections.get('https://abcd.localhost/'), {
url: new URL('https://elastic:changeme@abcd.localhost'),
id: 'https://abcd.localhost/',
ssl: null,
deadCount: 0,
resurrectTimeout: 0,
roles: {
master: true,
data: true,
ingest: true,
ml: false
}
})
})