MCPcopy Create free account
hub / github.com/Azure/peerd / TestServerCommand_InvalidHttpsAddr

Function TestServerCommand_InvalidHttpsAddr

cmd/proxy/main_test.go:87–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

85}
86
87func 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
108func TestLoggingConfiguration(t *testing.T) {
109 testCases := []struct {

Callers

nothing calls this directly

Calls 1

serverCommandFunction · 0.85

Tested by

no test coverage detected