(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func 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 | |
| 25 | func TestValidateUsers(t *testing.T) { |
| 26 | tests := []struct { |
nothing calls this directly
no test coverage detected