From 441f68f9c5efac1995ec8c56bef3ec01fe472d81 Mon Sep 17 00:00:00 2001 From: Ishan Khare Date: Thu, 9 Nov 2023 14:32:52 +0530 Subject: [PATCH] log metrics tests into ginkgo writer Signed-off-by: Ishan Khare --- test/e2e_metrics_proxy/metricsProxy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e_metrics_proxy/metricsProxy.go b/test/e2e_metrics_proxy/metricsProxy.go index 8eae7496a..d02550c15 100644 --- a/test/e2e_metrics_proxy/metricsProxy.go +++ b/test/e2e_metrics_proxy/metricsProxy.go @@ -2,6 +2,7 @@ package e2emetricsproxy import ( "context" + "fmt" "time" "github.com/loft-sh/vcluster/pkg/metricsapiservice" @@ -10,7 +11,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog/v2" apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationv1clientset "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" @@ -47,7 +47,7 @@ var _ = ginkgo.Describe("Target Namespace", func() { } if len(nodeMetricsList.Items) == 0 { - klog.Errorf("expecting node metrics list to have at least 1 entry, got %s", len(nodeMetricsList.Items)) + fmt.Fprintf(ginkgo.GinkgoWriter, "expecting node metrics list to have at least 1 entry, got %d", len(nodeMetricsList.Items)) return false, nil } @@ -57,7 +57,7 @@ var _ = ginkgo.Describe("Target Namespace", func() { } if len(podMetricsList.Items) == 0 { - klog.Errorf("expecting node metrics list to have at least 1 entry, got %s", len(podMetricsList.Items)) + fmt.Fprintf(ginkgo.GinkgoWriter, "expecting pod metrics list to have at least 1 entry, got %d", len(podMetricsList.Items)) return false, nil }