Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
gi8lino committed Aug 25, 2024
1 parent 7b3b5f5 commit a4d54f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/checker/http_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,9 @@ func TestIsValidCheckTypeWithProxy(t *testing.T) {
t.Fatalf("expected an error, got none")
}

expected := "Get \"http://example.com\": proxyconnect tcp: dial tcp: lookup invalid-proxy: no such host"
if err.Error() != expected {
// Github throws a different error message than on my local machine, so check with contains
expected := "Get \"http://example.com\": proxyconnect tcp: dial tcp: lookup invalid-proxy"
if !strings.Contains(err.Error(), expected) {
t.Errorf("expected error containing %q, got %q", expected, err.Error())
}
})
Expand Down

0 comments on commit a4d54f5

Please sign in to comment.