MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestValidateTLSFiles

Function TestValidateTLSFiles

controlplane/validation_test.go:11–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestValidateTLSFiles(t *testing.T) {
12 if err := validateTLSFiles("cert.pem", "key.pem"); err != nil {
13 t.Fatalf("expected valid TLS files, got error: %v", err)
14 }
15
16 if err := validateTLSFiles("", "key.pem"); err == nil {
17 t.Fatalf("expected error for missing cert file")
18 }
19
20 if err := validateTLSFiles("cert.pem", ""); err == nil {
21 t.Fatalf("expected error for missing key file")
22 }
23}
24
25func TestValidateUsers(t *testing.T) {
26 tests := []struct {

Callers

nothing calls this directly

Calls 1

validateTLSFilesFunction · 0.85

Tested by

no test coverage detected