(t *testing.T)
| 23 | ` |
| 24 | |
| 25 | func TestParseValid(t *testing.T) { |
| 26 | c, err := Parse([]byte(validYAML)) |
| 27 | if err != nil { |
| 28 | t.Fatal(err) |
| 29 | } |
| 30 | if c.Active != "default" { |
| 31 | t.Fatalf("Active: got %q want default", c.Active) |
| 32 | } |
| 33 | p, ok := c.Lookup("default") |
| 34 | if !ok { |
| 35 | t.Fatal("Lookup failed") |
| 36 | } |
| 37 | if len(p.EffectiveSNIPool()) != 2 { |
| 38 | t.Fatalf("SNI pool size: %d", len(p.EffectiveSNIPool())) |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | func TestParseRejects(t *testing.T) { |
| 43 | cases := []struct { |
nothing calls this directly
no test coverage detected