Co-authored-by: Siddhu545 <Siddharthkhengare@gmail.com>
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
This commit is contained in:
Siddharth Khengare
2025-04-15 18:44:00 +01:00
committed by GitHub
parent d9d54b1bb8
commit 9d719ce874
2 changed files with 39 additions and 1 deletions

View File

@ -287,9 +287,25 @@ test('Elastic Cloud config', t => {
t.equal(connection?.url.hostname, 'abcd.localhost')
t.equal(connection?.url.protocol, 'https:')
t.test('Invalid Cloud ID will throw ConfigurationError', t => {
t.throws(() => new Client({
cloud : {
id : 'invalidCloudIdThatIsNotBase64'
},
auth : {
username: 'elastic',
password: 'changeme'
}
}), errors.ConfigurationError)
t.end()
})
t.end()
})
test('Override default Elastic Cloud options', t => {
const client = new Client({
cloud: {