MCPcopy Create free account
hub / github.com/perkeep/perkeep / isErrorWithSubstring

Function isErrorWithSubstring

pkg/jsonsign/jsonsign_test.go:107–112  ·  view source on GitHub ↗
(err error, substr string)

Source from the content-addressed store, hash-verified

105}
106
107func isErrorWithSubstring(err error, substr string) bool {
108 if err == nil {
109 return false
110 }
111 return strings.Contains(err.Error(), substr)
112}
113
114func TestSigningBadInput(t *testing.T) {
115 sr := newRequest(1)

Callers 2

TestSigningBadInputFunction · 0.85
TestSigningFunction · 0.85

Calls 2

ContainsMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected