(t *testing.T)
| 49 | } |
| 50 | |
| 51 | func TestServer_AuthEnabled(t *testing.T) { |
| 52 | cfg := &Config{Host: "127.0.0.1", Port: 8080, AuthToken: "testtoken"} |
| 53 | if !cfg.AuthEnabled() { |
| 54 | t.Error("Config with AuthToken should have auth enabled") |
| 55 | } |
| 56 | srv := New(cfg) |
| 57 | if srv == nil { |
| 58 | t.Fatal("New() returned nil") |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // freePort asks the OS for an available TCP port on localhost. |
| 63 | func freePort(t *testing.T) int { |
nothing calls this directly
no test coverage detected