From 252ec74b941c4b0b1cae0838f5b5018ad2c51cf2 Mon Sep 17 00:00:00 2001 From: Darya Melentsova Date: Mon, 1 May 2023 13:04:39 +0300 Subject: [PATCH] fix test Signed-off-by: Darya Melentsova --- prometheus/graphite/bridge_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prometheus/graphite/bridge_test.go b/prometheus/graphite/bridge_test.go index 1ab930af3..62ee8e2c9 100644 --- a/prometheus/graphite/bridge_test.go +++ b/prometheus/graphite/bridge_test.go @@ -468,7 +468,7 @@ func ExampleBridge() { func TestErrorHandler(t *testing.T) { var internalError error c := &Config{ - URL: "", + URL: "localhost", Gatherer: prometheus.DefaultGatherer, Prefix: "prefix", Interval: 5 * time.Second, @@ -488,8 +488,8 @@ func TestErrorHandler(t *testing.T) { // Start pushing metrics to Graphite in the Run() loop. b.Run(ctx) - // We haven't specified tcp address - expError := fmt.Errorf("dial tcp: missing address") + // We haven't specified port + expError := fmt.Errorf("dial tcp: address localhost: missing port in address") if internalError.Error() != expError.Error() { t.Fatalf("Expected: '%s', actual: '%s'", expError, internalError) }