MCPcopy Create free account
hub / github.com/prometheus/common / TestTLSConfigEmpty

Function TestTLSConfigEmpty

config/http_config_test.go:803–816  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

801}
802
803func TestTLSConfigEmpty(t *testing.T) {
804 configTLSConfig := TLSConfig{
805 InsecureSkipVerify: true,
806 }
807
808 expectedTLSConfig := &tls.Config{
809 InsecureSkipVerify: configTLSConfig.InsecureSkipVerify,
810 }
811
812 tlsConfig, err := NewTLSConfig(&configTLSConfig)
813 require.NoErrorf(t, err, "Can't create a new TLS Config from a configuration (%s).", err)
814
815 require.Truef(t, reflect.DeepEqual(tlsConfig, expectedTLSConfig), "Unexpected TLS Config result: \n\n%+v\n expected\n\n%+v", tlsConfig, expectedTLSConfig)
816}
817
818func TestTLSConfigInvalidCA(t *testing.T) {
819 invalidTLSConfig := []struct {

Callers

nothing calls this directly

Calls 1

NewTLSConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…