(t *testing.T)
| 85 | } |
| 86 | |
| 87 | func TestServerCommand_InvalidHttpsAddr(t *testing.T) { |
| 88 | ctx := testCtx |
| 89 | |
| 90 | args := &ServerCmd{ |
| 91 | HttpAddr: "127.0.0.1:8080", |
| 92 | HttpsAddr: "invalid-address", |
| 93 | RouterAddr: "127.0.0.1:8082", |
| 94 | PromAddr: "127.0.0.1:8083", |
| 95 | PrefetchWorkers: 10, |
| 96 | } |
| 97 | |
| 98 | err := serverCommand(ctx, args) |
| 99 | if err == nil { |
| 100 | t.Error("Expected error for invalid https address") |
| 101 | } |
| 102 | |
| 103 | if !strings.Contains(err.Error(), "missing port") { |
| 104 | t.Errorf("Expected 'missing port' error, got %v", err) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func TestLoggingConfiguration(t *testing.T) { |
| 109 | testCases := []struct { |
nothing calls this directly
no test coverage detected