ports/sysutils/nomad/files/ephemeral_openbsd_test.go

19 lines
334 B
Go
Raw Normal View History

2023-08-16 22:26:55 +00:00
//+build openbsd
package freeport
import (
"testing"
)
func TestGetEphemeralPortRange(t *testing.T) {
min, max, err := getEphemeralPortRange()
if err != nil {
t.Fatalf("err: %v", err)
}
if min <= 0 || max <= 0 || min > max {
t.Fatalf("unexpected values: min=%d, max=%d", min, max)
}
t.Logf("min=%d, max=%d", min, max)
}