Skip to content

Commit

Permalink
log metrics tests into ginkgo writer
Browse files Browse the repository at this point in the history
Signed-off-by: Ishan Khare <[email protected]>
  • Loading branch information
ishankhare07 committed Nov 9, 2023
1 parent 9fcf6d9 commit 441f68f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e_metrics_proxy/metricsProxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package e2emetricsproxy

import (
"context"
"fmt"
"time"

"github.com/loft-sh/vcluster/pkg/metricsapiservice"
Expand All @@ -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"

Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 441f68f

Please sign in to comment.