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_ethernet_interface.cpp b/test/test_ethernet_interface.cpp
index c25bba9..5ea7f7a 100644
--- a/test/test_ethernet_interface.cpp
+++ b/test/test_ethernet_interface.cpp
@@ -56,6 +56,7 @@
static EthernetInterface makeInterface(sdbusplus::bus::bus& bus,
MockManager& manager)
{
+ mock_clear();
mock_addIF("test0", 1, mac);
return {bus, "/xyz/openbmc_test/network/test0", false, manager};
}