MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / TestHTTPSSetupHTTPOnlySnippetClearsHTTPS

Function TestHTTPSSetupHTTPOnlySnippetClearsHTTPS

scripts/https_setup_test.go:61–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func TestHTTPSSetupHTTPOnlySnippetClearsHTTPS(t *testing.T) {
62 configPath := writeHTTPSSetupTempConfig(t, sampleHTTPSConfig)
63
64 input := strings.Join([]string{
65 "3",
66 "8080",
67 "2",
68 "",
69 }, "\n")
70
71 output := runHTTPSSetup(t, configPath, input, nil)
72 if !strings.Contains(output, "HttpsCertFile: ''") {
73 t.Fatalf("https-setup output did not clear cert override:\n%s", output)
74 }
75 if !strings.Contains(output, "HttpsPort: 0") {
76 t.Fatalf("https-setup output did not disable HTTPS in snippet:\n%s", output)
77 }
78}
79
80func TestHTTPSSetupUsesConfigPathAsOverrideTarget(t *testing.T) {
81 configPath := writeHTTPSSetupTempConfig(t, sampleHTTPSConfig)

Callers

nothing calls this directly

Calls 2

runHTTPSSetupFunction · 0.85

Tested by

no test coverage detected