(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func TestValidTLSConfig(t *testing.T) { |
| 101 | for _, cfg := range expectedTLSConfigs { |
| 102 | got, err := LoadTLSConfig("testdata/" + cfg.filename) |
| 103 | if err != nil { |
| 104 | t.Fatalf("Error parsing %s: %s", cfg.filename, err) |
| 105 | } |
| 106 | // non-nil functions are never equal. |
| 107 | got.GetClientCertificate = nil |
| 108 | if !reflect.DeepEqual(got, cfg.config) { |
| 109 | t.Fatalf("%v: unexpected config result: \n\n%v\n expected\n\n%v", cfg.filename, got, cfg.config) |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | var invalidTLSConfigs = []struct { |
| 115 | filename string |
nothing calls this directly
no test coverage detected