kubernetes/staging/src/k8s.io/apiserver/pkg/util/x509metrics/server_cert_deprecations_test.go

var caCert

var caCertInter

var caCertInterSHA1

var serverKey

var serverCert

var serverCertNoSAN

var sha1ServerCertInter

var serverCertInterSHA1

// Test_checkForHostnameError tests that the upstream message for remote server
// certificate's hostname hasn't changed when no SAN extension is present and that
// the metrics counter increases properly when such an error is encountered
//
// Requires GODEBUG=x509ignoreCN=0 to not be set in the environment
func TestCheckForHostnameError(t *testing.T) {}

func TestCheckRespForNoSAN(t *testing.T) {}

func TestCheckForInsecureAlgorithmError(t *testing.T) {}

func TestCheckRespSHA1SignedCert(t *testing.T) {}

func Test_x509DeprecatedCertificateMetricsRTWrapper_RoundTrip(t *testing.T) {}

type testRoundTripper

func (rt testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {}

func newTestRoundTripper(resp *http.Response, err error) testRoundTripper {}

type testPositiveChecker

func (c *testPositiveChecker) CheckRoundTripError(_ error) bool {}

func (c *testPositiveChecker) CheckPeerCertificates(_ []*x509.Certificate) bool {}

type testNegativeChecker

func (c *testNegativeChecker) CheckRoundTripError(_ error) bool {}

func (c *testNegativeChecker) CheckPeerCertificates(_ []*x509.Certificate) bool {}

func httpResponseWithCert() *http.Response {}

func httpResponseNoCert() *http.Response {}

func testServer(t *testing.T, serverCert []byte) (*httptest.Server, *url.URL) {}

func getSingleCounterValueFromRegistry(t *testing.T, r metrics.Gatherer, name string) int {}