diff --git a/unittest/vslib/Makefile.am b/unittest/vslib/Makefile.am index 284f2379a87b..67938d4b9b36 100644 --- a/unittest/vslib/Makefile.am +++ b/unittest/vslib/Makefile.am @@ -22,6 +22,7 @@ testslibsaivs_SOURCES = main_libsaivs.cpp \ test_sai_vs_fdb.cpp \ test_sai_vs_ipmc.cpp \ test_sai_vs_l2mc.cpp \ + test_sai_vs_l2mcgroup.cpp \ test_sai_vs_ipmc_group.cpp \ test_sai_vs_isolation_group.cpp \ test_sai_vs_hash.cpp \ diff --git a/unittest/vslib/test_sai_vs_l2mcgroup.cpp b/unittest/vslib/test_sai_vs_l2mcgroup.cpp new file mode 100644 index 000000000000..a96c72211701 --- /dev/null +++ b/unittest/vslib/test_sai_vs_l2mcgroup.cpp @@ -0,0 +1,28 @@ +#include + +extern "C" { +#include "sai.h" +} + +#include "swss/logger.h" + +TEST(libsaivs, l2mc_group) +{ + sai_l2mc_group_api_t *api = nullptr; + + sai_api_query(SAI_API_L2MC_GROUP, (void**)&api); + + EXPECT_NE(api, nullptr); + + sai_object_id_t id; + + EXPECT_NE(SAI_STATUS_SUCCESS, api->create_l2mc_group(&id,0,0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_l2mc_group(0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->set_l2mc_group_attribute(0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->get_l2mc_group_attribute(0,0,0)); + + EXPECT_NE(SAI_STATUS_SUCCESS, api->create_l2mc_group_member(&id,0,0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_l2mc_group_member(0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->set_l2mc_group_member_attribute(0,0)); + EXPECT_NE(SAI_STATUS_SUCCESS, api->get_l2mc_group_member_attribute(0,0,0)); +}