Bind port 0 in main_test (#9558)

Fixes #9499

Signed-off-by: Furkan <furkan.turkal@trendyol.com>
pull/9511/head
Furkan Türkal 5 years ago committed by GitHub
parent 18886c33c2
commit 9d0058a09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/prometheus/main_test.go

@ -202,7 +202,7 @@ func TestWALSegmentSizeBounds(t *testing.T) {
}
for size, expectedExitStatus := range map[string]int{"9MB": 1, "257MB": 1, "10": 2, "1GB": 1, "12MB": 0} {
prom := exec.Command(promPath, "-test.main", "--storage.tsdb.wal-segment-size="+size, "--config.file="+promConfig)
prom := exec.Command(promPath, "-test.main", "--storage.tsdb.wal-segment-size="+size, "--web.listen-address=0.0.0.0:0", "--config.file="+promConfig)
// Log stderr in case of failure.
stderr, err := prom.StderrPipe()
@ -244,7 +244,7 @@ func TestMaxBlockChunkSegmentSizeBounds(t *testing.T) {
}
for size, expectedExitStatus := range map[string]int{"512KB": 1, "1MB": 0} {
prom := exec.Command(promPath, "-test.main", "--storage.tsdb.max-block-chunk-segment-size="+size, "--config.file="+promConfig)
prom := exec.Command(promPath, "-test.main", "--storage.tsdb.max-block-chunk-segment-size="+size, "--web.listen-address=0.0.0.0:0", "--config.file="+promConfig)
// Log stderr in case of failure.
stderr, err := prom.StderrPipe()

Loading…
Cancel
Save