github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/helper/freeport/ephemeral_linux_test.go (about) 1 //go:build linux 2 // +build linux 3 4 package freeport 5 6 import ( 7 "testing" 8 ) 9 10 func TestGetEphemeralPortRange(t *testing.T) { 11 min, max, err := getEphemeralPortRange() 12 if err != nil { 13 t.Fatalf("err: %v", err) 14 } 15 if min <= 0 || max <= 0 || min > max { 16 t.Fatalf("unexpected values: min=%d, max=%d", min, max) 17 } 18 t.Logf("min=%d, max=%d", min, max) 19 }