statsd_exporter/pkg
Matthias Rampke 39a8629864
Use IPv6 localhost for relay test
This is the only way I could find to make the test pass on _my_
macOS machine:

```
Darwin mr-6.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
```

I don't understand the problem here, and I am not sure what the
implications are; this probably breaks the test on IPv4-only machines if
those still exist.

Without this change, or even when using 127.0.0.1, nothing is received.

```
=== RUN   TestRelay_RelayLine
=== RUN   TestRelay_RelayLine/multiple_lines
    udp.go:85: At: /Users/mr/src/github.com/prometheus/statsd_exporter/pkg/relay/relay_test.go:68
    udp.go:115: Expected to find: "foo5:100|c|#tag1:bar,#tag2:baz\n"
    udp.go:116: But got: ""
--- FAIL: TestRelay_RelayLine (0.00s)
    --- FAIL: TestRelay_RelayLine/multiple_lines (0.00s)
FAIL
FAIL	github.com/prometheus/statsd_exporter/pkg/relay	1.809s
FAIL
```

Is there a better or more well understood solution?

Possibly related: `localhost` is [not well defined](https://github.com/golang/go/issues/22826).

Signed-off-by: Matthias Rampke <matthias@prometheus.io>
2022-07-08 12:22:00 +00:00
..
address Change casing of error messages 2020-09-06 16:33:18 +05:30
clock hopefully now linux 2020-04-08 15:29:54 -04:00
event cleanup 2021-02-06 23:21:49 -05:00
exporter feat: enable more linters and fix warnings (#364) 2021-10-24 21:27:31 +07:00
level refactor: replace level pkg 2021-09-01 18:55:45 +08:00
line feat: enable more linters and fix warnings (#364) 2021-10-24 21:27:31 +07:00
listener Add statsd relay 2021-09-01 15:14:01 +02:00
mapper Fixing broken benchmark for mapper 2022-06-17 12:14:29 +02:00
mappercache Use groupcache for LRU cache 2021-04-28 12:15:19 -04:00
metrics Added license. 2020-04-08 15:30:01 -04:00
registry Use the instance registry instead of the prometheus.registry 2021-11-17 11:37:39 -05:00
relay Use IPv6 localhost for relay test 2022-07-08 12:22:00 +00:00
README.md Add deprecation note to pkg directory 2021-10-13 14:40:09 +02:00

The pkg directory is deprecated. Please do not add new packages to this directory. Existing packages will be moved elsewhere eventually.