Skip to content

Commit

Permalink
Merge pull request #367 from mattbostock/use_localhost_for_tests
Browse files Browse the repository at this point in the history
Use localhost for tests
  • Loading branch information
fabxc committed Jun 7, 2016
2 parents 6c1581f + 68a1e51 commit 5843dcf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/acceptance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion test/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5843dcf

Please sign in to comment.