(t *testing.T)
| 59 | } |
| 60 | |
| 61 | func 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 | |
| 80 | func TestHTTPSSetupUsesConfigPathAsOverrideTarget(t *testing.T) { |
| 81 | configPath := writeHTTPSSetupTempConfig(t, sampleHTTPSConfig) |
nothing calls this directly
no test coverage detected