MCPcopy Create free account
hub / github.com/SamNet-dev/snix / TestParseValid

Function TestParseValid

config/config_test.go:25–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

23`
24
25func 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
42func TestParseRejects(t *testing.T) {
43 cases := []struct {

Callers

nothing calls this directly

Calls 3

ParseFunction · 0.85
LookupMethod · 0.80
EffectiveSNIPoolMethod · 0.80

Tested by

no test coverage detected