test: Clear out old mocks prior to testing
This ensures we don't have stale mock data left over after each run
that will leak into unrelated tests.
Change-Id: I08bc12f99f1103c5d3024bf90047105b221622a2
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/test_rtnetlink.cpp b/test/test_rtnetlink.cpp
index 794a0dd..6a8c02d 100644
--- a/test/test_rtnetlink.cpp
+++ b/test/test_rtnetlink.cpp
@@ -87,6 +87,7 @@
TEST_F(TestRtNetlink, WithSingleInterface)
{
using namespace std::chrono;
+ mock_clear();
// Adds the following ip in the getifaddrs list.
mock_addIF("igb5", 6);
mock_addIP("igb5", "127.0.0.1", "255.255.255.128", IFF_UP | IFF_RUNNING);