Skip to content

Commit

Permalink
Add qos map tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Aug 23, 2021
1 parent 8162205 commit e01707f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions unittest/vslib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ testslibsaivs_SOURCES = main_libsaivs.cpp \
test_sai_vs_nexthop.cpp \
test_sai_vs_nexthopgroup.cpp \
test_sai_vs_port.cpp \
test_sai_vs_qosmaps.cpp \
test_sai_vs_policer.cpp \
test_sai_vs_vlan.cpp \
test_sai_vs_hostif.cpp \
Expand Down
23 changes: 23 additions & 0 deletions unittest/vslib/test_sai_vs_qosmaps.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <gtest/gtest.h>

extern "C" {
#include "sai.h"
}

#include "swss/logger.h"

TEST(libsaivs, qos_map)
{
sai_qos_map_api_t *api = nullptr;

sai_api_query(SAI_API_QOS_MAP, (void**)&api);

EXPECT_NE(api, nullptr);

sai_object_id_t id;

EXPECT_NE(SAI_STATUS_SUCCESS, api->create_qos_map(&id,0,0,0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->remove_qos_map(0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->set_qos_map_attribute(0,0));
EXPECT_NE(SAI_STATUS_SUCCESS, api->get_qos_map_attribute(0,0,0));
}

0 comments on commit e01707f

Please sign in to comment.