// tests that proxying /metrics works
tests that proxying /metrics works
// tests that proxying / metrics works
func TestHappyPathWithMetrics(t *testing.T) {
	namespace, tearDown := integrationTestSetup(t, "happy-path-metrics")
	defer tearDown()
	pod := waitForPodToComeUp(t, namespace, "app=kube-api-proxy")
	stdout := runCurlCommand(t, namespace, pod, "localhost:10255/metrics")
	lines := strings.Split(stdout, "\n")
	if assert.True(t, len(lines) > 100) {
		for _, line := range lines {
			if strings.HasPrefix(line, "apiserver_request_duration_seconds") {
				return
			}
		}
		t.Errorf("Did not find metric apiserver_request_duration_seconds")
	}
}
func TestHappyPathWithMetrics ( t * testing . T ) { namespace , tearDown := integrationTestSetup ( t , " " ) defer tearDown ( ) pod := waitForPodToComeUp ( t , namespace , " " ) stdout := runCurlCommand ( t , namespace , pod , " " ) lines := strings . Split ( stdout , " \n " ) if assert . True ( t , len ( lines ) > 100 ) { for _ , line := range lines { if strings . HasPrefix ( line , " " ) { return } } t . Errorf ( " " ) } }
tests that proxying /metrics works
tests that proxying / metrics works
// there should be _a lot_ of metrics // and one of them should be "apiserver_request_duration_seconds"