Skip to content

Commit

Permalink
Add RedisVidIndexGenerator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik committed Sep 20, 2021
1 parent 58725df commit 62b8fdd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unittest/lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ tests_SOURCES = \
TestSwitchContainer.cpp \
TestSwitchConfigContainer.cpp \
TestSkipRecordAttrContainer.cpp \
TestServerConfig.cpp
TestServerConfig.cpp \
TestRedisVidIndexGenerator.cpp

tests_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
tests_LDADD = $(LDADD_GTEST) $(top_srcdir)/lib/libSaiRedis.a -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
Expand Down
16 changes: 16 additions & 0 deletions unittest/lib/TestRedisVidIndexGenerator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "RedisVidIndexGenerator.h"

#include <gtest/gtest.h>

#include <memory>

using namespace sairedis;

TEST(RedisVidIndexGenerator, reset)
{
auto db = std::make_shared<swss::DBConnector>("ASIC_DB", 0);

RedisVidIndexGenerator g(db, "FOO");

g.reset();
}

0 comments on commit 62b8fdd

Please sign in to comment.