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
NoSkillGirl 087b4330d4 added metrics check for policy creation
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-06-21 20:35:51 +05:30

23 lines
462 B
Go

package metrics
import (
"os"
"testing"
"github.com/kyverno/kyverno/test/e2e"
. "github.com/onsi/gomega"
)
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))
}