Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
aphralG committed Oct 17, 2024
1 parent b58d8b3 commit d06df36
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/plugins/nginx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1172,14 +1172,20 @@ func TestNginx_monitorLog(t *testing.T) {
expected: "",
},
{
name: "ignore usage report test",
errorLog: "2023/06/20 11:01:56 [emerg] 4138#4138: usage report",
name: "ignore error log: usage report ",
errorLog: "2025/06/25 15:08:04 [error] 123456#123456: certificate verify error: (10:certificate has expired) during usage report",
treatWarningsAsErrors: false,
expected: "",
},
{
name: "ignore license expired test",
errorLog: "2023/06/20 11:01:56 [emerg] 4138#4138: license expired",
name: "ignore error log: license expired ",
errorLog: "2025/06/25 15:07:24 [alert] 123456#123456: license expired; the grace period will end in 71 days",
treatWarningsAsErrors: false,
expected: "",
},
{
name: "ignore error log: usaage report 400",
errorLog: "2024/12/25 15:00:04 [error] 123456#123456: server returned 400 during usage report",
treatWarningsAsErrors: false,
expected: "",
},
Expand Down

0 comments on commit d06df36

Please sign in to comment.