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:
@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user