Skip to content

Commit ba608cb

Browse files
committed
fixup! ✨ util: Warning handler that discards messages that match a regular expression
Split conflated test case into two independent test cases
1 parent e1fd486 commit ba608cb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

util/apiwarnings/handler_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ func TestDiscardMatchingHandler(t *testing.T) {
5757
{
5858
name: "do not log, if code is not 299",
5959
code: 0,
60+
message: "warning",
61+
expressions: []regexp.Regexp{},
62+
wantLogged: false,
63+
},
64+
{
65+
name: "do not log, if message is empty",
66+
code: 299,
6067
message: "",
6168
expressions: []regexp.Regexp{},
6269
wantLogged: false,

0 commit comments

Comments
 (0)