1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/test/e2e/metrics/metrics_test.go

23 lines
461 B
Go
Raw Normal View History

package metrics
import (
"github.com/kyverno/kyverno/test/e2e"
. "github.com/onsi/gomega"
"os"
"testing"
)
func Test_MetricsServerAvailability(t *testing.T) {
RegisterTestingT(t)
if os.Getenv("E2E") == "" {
t.Skip("Skipping E2E Test")
}
requestObj := e2e.APIRequest{
URL: "http://localhost:8000/metrics",
Type: "GET",
}
response, err := e2e.CallAPI(requestObj)
Expect(err).NotTo(HaveOccurred())
Expect(response.StatusCode).To(Equal(200))
}