| 123456789101112 |
- package main
- import "testing"
- func TestEffectiveHTTPPort(t *testing.T) {
- if got := effectiveHTTPPort(80, 8081, false); got != 8081 {
- t.Fatalf("configured port ignored: %d", got)
- }
- if got := effectiveHTTPPort(9090, 8081, true); got != 9090 {
- t.Fatalf("explicit override ignored: %d", got)
- }
- }
|