Skip to content

Commit 62b8fdd

Browse files
committed
Add RedisVidIndexGenerator tests
1 parent 58725df commit 62b8fdd

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

unittest/lib/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ tests_SOURCES = \
1919
TestSwitchContainer.cpp \
2020
TestSwitchConfigContainer.cpp \
2121
TestSkipRecordAttrContainer.cpp \
22-
TestServerConfig.cpp
22+
TestServerConfig.cpp \
23+
TestRedisVidIndexGenerator.cpp
2324

2425
tests_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
2526
tests_LDADD = $(LDADD_GTEST) $(top_srcdir)/lib/libSaiRedis.a -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "RedisVidIndexGenerator.h"
2+
3+
#include <gtest/gtest.h>
4+
5+
#include <memory>
6+
7+
using namespace sairedis;
8+
9+
TEST(RedisVidIndexGenerator, reset)
10+
{
11+
auto db = std::make_shared<swss::DBConnector>("ASIC_DB", 0);
12+
13+
RedisVidIndexGenerator g(db, "FOO");
14+
15+
g.reset();
16+
}

0 commit comments

Comments
 (0)