kibana/test/common/services
Frank Hassanabad 0d3ddbe9d0
Fixes the client to setup SSL with the CA certificates for testing (#65598)
## Summary

Fixes the non-legacy ES test client to work with SSL.

Without this if you try to migrate `siem rules` or `alerting` or `CASE` or anything else that is using SSL based tests you get this error when trying to use the non-legacy:

```ts
// pull in non-legacy service for functional tests
const es = getService('es');
```

```ts
// use it somewhere where your config.ts is utilizing SSL in a functional test
// ...
```

In your console you get this error:

```ts
    ConnectionError: self signed certificate in certificate chain
          at onResponse (node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
          at ClientRequest.request.on.err (node_modules/@elastic/elasticsearch/lib/Connection.js:98:9)
          at TLSSocket.socketErrorListener (_http_client.js:401:9)
          at emitErrorNT (internal/streams/destroy.js:91:8)
          at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
          at process._tickCallback (internal/process/next_tick.js:63:19)
```

This fixes that by adding the CA certs from test to the ES test client.
2020-05-07 07:57:34 -06:00
..
kibana_server [ftr/lifecycle] refactor to be typesafe (#52453) 2019-12-09 18:46:45 -07:00
retry [prettier] upgrade to 1.18.2 (#40229) 2019-07-03 12:36:44 -07:00
security FTR configurable test users (#52431) 2020-03-17 10:41:23 -07:00
elasticsearch.ts Fixes the client to setup SSL with the CA certificates for testing (#65598) 2020-05-07 07:57:34 -06:00
es_archiver.ts [FTR] expose new es client service (#51066) 2019-11-20 08:56:23 -07:00
index.ts moved security to OSS/common (#52322) 2019-12-05 12:03:35 -08:00
legacy_es.ts [FTR] Support for new and old es clients (#47377) 2019-10-08 09:53:24 -06:00
randomness.ts use a custom wrapper around chance with longer defaults to avoid conflicts (#49653) 2019-10-31 07:09:32 -07:00