Remove direct references to prometheus from transformation_testcase.go

Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
This commit is contained in:
yuxiaobo
2019-10-12 17:51:43 +08:00
parent fbcfabe8ae
commit 3346d3d18f
2 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ import (
"k8s.io/klog"
"github.com/coreos/etcd/clientv3"
"github.com/prometheus/client_golang/prometheus"
"k8s.io/component-base/metrics/legacyregistry"
"sigs.k8s.io/yaml"
corev1 "k8s.io/api/core/v1"
@@ -241,7 +241,7 @@ func (e *transformTest) readRawRecordFromETCD(path string) (*clientv3.GetRespons
func (e *transformTest) printMetrics() error {
e.logger.Logf("Transformation Metrics:")
metrics, err := prometheus.DefaultGatherer.Gather()
metrics, err := legacyregistry.DefaultGatherer.Gather()
if err != nil {
return fmt.Errorf("failed to gather metrics: %s", err)
}