Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Darya Melentsova <ifireice@gmail.com>
  • Loading branch information
ifireice committed May 1, 2023
1 parent 45e725d commit 0ba5356
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prometheus/graphite/bridge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ func ExampleBridge() {
func TestErrorHandler(t *testing.T) {
var internalError error
c := &Config{
URL: "graphite.example.org:3099",
URL: "",
Gatherer: prometheus.DefaultGatherer,
Prefix: "prefix",
Interval: 5 * time.Second,
Expand All @@ -488,8 +488,8 @@ func TestErrorHandler(t *testing.T) {
// Start pushing metrics to Graphite in the Run() loop.
b.Run(ctx)

// There are obviously no hosts like "graphite.example.com" available during the tests.
expError := fmt.Errorf("dial tcp: lookup graphite.example.org: no such host")
// We haven't specified tcp address
expError := fmt.Errorf("dial tcp: missing address")
if internalError.Error() != expError.Error() {
t.Fatalf("Expected: '%s', actual: '%s'", expError, internalError)
}
Expand Down

0 comments on commit 0ba5356

Please sign in to comment.