Skip to content

Commit

Permalink
Add logic for empty regex expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jun 15, 2022
1 parent b92bb29 commit 4468e11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sonic-eventd/rsyslog_plugin_tests/rsyslog_plugin_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ TEST(rsyslog_plugin, onInit_invalidJS0N) {
delete plugin;
}

TEST(rsyslog_plugin, onInit_emptyJSON) {
auto plugin = createPlugin("./test_regex_6.rc.json");
EXPECT_EQ(false, plugin->onInit());
delete plugin;
}

TEST(rsyslog_plugin, onInit_missingRegex) {
auto plugin = createPlugin("./test_regex_3.rc.json");
EXPECT_EQ(false, plugin->onInit());
Expand Down
Empty file.

0 comments on commit 4468e11

Please sign in to comment.