Co-authored-by: Siddhu545 <Siddharthkhengare@gmail.com>
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
Co-authored-by: Siddharth Khengare <67581382+Siddhu545@users.noreply.github.com>
This commit is contained in:
Josh Mock
2025-04-15 13:26:29 -05:00
committed by GitHub
parent c5dd4e96d4
commit 4a059fdc0c
2 changed files with 39 additions and 1 deletions

View File

@ -300,9 +300,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: {