MCPcopy
hub / github.com/grpc/grpc-go / TestNewLoggerFromConfigStringInvalid

Method TestNewLoggerFromConfigStringInvalid

internal/binarylog/env_config_test.go:68–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func (s) TestNewLoggerFromConfigStringInvalid(t *testing.T) {
69 testCases := []string{
70 "",
71 "*{}",
72 "s/m,*{}",
73 "s/m,s/m{a}",
74
75 // Duplicate rules.
76 "s/m,-s/m",
77 "-s/m,s/m",
78 "s/m,s/m",
79 "s/m,s/m{h:1;m:1}",
80 "s/m{h:1;m:1},s/m",
81 "-s/m,-s/m",
82 "s/*,s/*{h:1;m:1}",
83 "*,*{h:1;m:1}",
84 }
85 for _, tc := range testCases {
86 l := NewLoggerFromConfigString(tc)
87 if l != nil {
88 t.Errorf("With config %q, want logger %v, got %v", tc, nil, l)
89 }
90 }
91}
92
93func (s) TestParseMethodConfigAndSuffix(t *testing.T) {
94 testCases := []struct {

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.65

Tested by

no test coverage detected