From 380d54e2e08ed3f7c2d3cd95f6a558ec68cf02ab Mon Sep 17 00:00:00 2001 From: Stephen Sun Date: Fri, 25 Oct 2024 01:59:03 +0000 Subject: [PATCH] Fix coverage Signed-off-by: Stephen Sun --- unittest/syncd/TestCommandLineOptions.cpp | 5 ++++- unittest/syncd/TestFlexCounter.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/unittest/syncd/TestCommandLineOptions.cpp b/unittest/syncd/TestCommandLineOptions.cpp index ad624eb50..7c9088bf0 100644 --- a/unittest/syncd/TestCommandLineOptions.cpp +++ b/unittest/syncd/TestCommandLineOptions.cpp @@ -77,8 +77,11 @@ TEST(CommandLineOptionsParser, parseCommandLine) char arg1[] = "test"; char arg2[] = "-w"; char arg3[] = "1000"; - std::vector args = {arg1, arg2, arg3}; + char arg4[] = "-B"; + char arg5[] = "WATERMARK"; + std::vector args = {arg1, arg2, arg3, arg4, arg5}; auto opt = syncd::CommandLineOptionsParser::parseCommandLine((int)args.size(), args.data()); EXPECT_EQ(opt->m_watchdogWarnTimeSpan, 1000); + EXPECT_EQ(opt->m_supportingBulkCounterGroups, "WATERMARK"); } diff --git a/unittest/syncd/TestFlexCounter.cpp b/unittest/syncd/TestFlexCounter.cpp index 1e81e3458..1b79e4d0d 100644 --- a/unittest/syncd/TestFlexCounter.cpp +++ b/unittest/syncd/TestFlexCounter.cpp @@ -456,7 +456,7 @@ void testAddRemovePlugin(const std::string& pluginFieldName) { SWSS_LOG_ENTER(); - FlexCounter fc("test", sai, "COUNTERS_DB"); + FlexCounter fc("test", sai, "COUNTERS_DB", true); std::vector values; values.emplace_back(pluginFieldName, "dummy_sha_strings");