kibana/test/common
Frank Hassanabad 20d39fecc1
Fixes the client to setup SSL with the CA certificates for testing (#65598) (#65686)
## 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.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 17:02:59 -06:00
..
fixtures/plugins/newsfeed Serve static assets from NP (#60490) (#61619) 2020-03-27 18:01:28 +01:00
services Fixes the client to setup SSL with the CA certificates for testing (#65598) (#65686) 2020-05-07 17:02:59 -06:00
config.js [7.x] [Telemetry] force staging urls in tests (#63356) (#63408) 2020-04-14 01:54:22 +03:00
ftr_provider_context.d.ts [ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948) (#32250) 2019-02-28 14:26:32 -08:00