Merge pull request #367 from mattbostock/use_localhost_for_tests
Use localhost for tests
This commit is contained in:
commit
5843dcf673
|
@ -86,7 +86,7 @@ func NewAcceptanceTest(t *testing.T, opts *AcceptanceOpts) *AcceptanceTest {
|
|||
func freeAddress() string {
|
||||
// Let the OS allocate a free address, close it and hope
|
||||
// it is still free when starting Alertmanager.
|
||||
l, err := net.Listen("tcp4", ":0")
|
||||
l, err := net.Listen("tcp4", "localhost:0")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ type MockWebhook struct {
|
|||
}
|
||||
|
||||
func NewWebhook(c *Collector) *MockWebhook {
|
||||
l, err := net.Listen("tcp4", ":0")
|
||||
l, err := net.Listen("tcp4", "localhost:0")
|
||||
if err != nil {
|
||||
// TODO(fabxc): if shutdown of mock destinations ever becomes a concern
|
||||
// we want to shut them down after test completion. Then we might want to
|
||||
|
|
Loading…
Reference in New Issue