Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Prometheus Remote Write Exporter for Cortex] Add TLS Support and Def…
…ault HTTP Client (#255) * Start buildClient for creating a default HTTP client * Add TestBuildClient and first subtest * Update TestBuildClient with TLS server, TLS Config, and Proxy URL * Add methods for loading user-supplied certificates * Add buildTLSConfig for creating a new TLS Config struct * Add TLS Config and Proxy URL to buildClient, and update TestBuildClient * Add additional tests for TestBuildClient * Add helper function for generating certificate files * Add helper function for generating CA certificate files * Add helper function for generating serving certificate files * Add helper function for generating client certificate files * Add part of integration test with certificate creation and TLS server * Add helper function for creating the test server's TLS Config struct * Update TestMutualTLS by adding TLS Config to server and client * Run make precommit and fix lint errors * Adjust test for BuildClient * Change certificate loading functions into inline conditionals * Change ProxyURL to be a url.URL instead of a string * Add check for InsecureSkipVerify to avoid parse errors * Change client Transport to use http.DefaultTransport as base * Change require.Nil to require.NoError for error checks * Change require.Error to assert.Error in some areas * Write certificate and key files directly instead of to memory first * Update DialContext timeout and KeepAlive for retrying CI test * Revert increase to DialContext timeout and keepalive to retry CI test
- Loading branch information