projects
/
blackbox_exporter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8211bed
)
Fixup chooseProtocol test.
author
SuperQ
<superq@gmail.com>
Sat, 22 Jan 2022 17:18:46 +0000
(18:18 +0100)
committer
SuperQ
<superq@gmail.com>
Mon, 24 Jan 2022 21:33:56 +0000
(22:33 +0100)
Verified this works all the way back to Go 1.13.
Signed-off-by: SuperQ <superq@gmail.com>
prober/utils_test.go
patch
|
blob
|
blame
|
history
diff --git
a/prober/utils_test.go
b/prober/utils_test.go
index ed56baf41eb24649072ce591f705e44b17eba55e..def607a0351edc0ceef6e1075d493d715388168f 100644
(file)
--- a/
prober/utils_test.go
+++ b/
prober/utils_test.go
@@
-162,7
+162,7
@@
func TestChooseProtocol(t *testing.T) {
registry = prometheus.NewPedanticRegistry()
ip, _, err = chooseProtocol(ctx, "ip4", false, "ipv6.google.com", registry, logger)
- if err != nil &&
err.Error() != "address ipv6.google.com: no suitable address found"
{
+ if err != nil &&
!err.(*net.DNSError).IsNotFound
{
t.Error(err)
} else if err == nil {
t.Error("should set error")