system_queries: Migrate system queries into a single place

This provides better separation of the DBus interface and the underlying
system interactions.

Change-Id: I8bf7a44c679ab065f959af19a00c29897c1d5c48
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/test_network_manager.cpp b/test/test_network_manager.cpp
index a607bb7..a34a5e7 100644
--- a/test/test_network_manager.cpp
+++ b/test/test_network_manager.cpp
@@ -6,11 +6,8 @@
 #include <netinet/in.h>
 #include <stdlib.h>
 
-#include <exception>
-#include <filesystem>
 #include <sdbusplus/bus.hpp>
 #include <stdplus/gtest/tmp.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
 
 #include <gtest/gtest.h>
 
@@ -21,7 +18,6 @@
 
 using ::testing::Key;
 using ::testing::UnorderedElementsAre;
-namespace fs = std::filesystem;
 
 class TestNetworkManager : public stdplus::gtest::TestWithTmp
 {
@@ -43,8 +39,9 @@
 // getifaddrs will not return any interface
 TEST_F(TestNetworkManager, NoInterface)
 {
-    using namespace sdbusplus::xyz::openbmc_project::Common::Error;
-    EXPECT_THROW(createInterfaces(), InternalFailure);
+    mock_clear();
+    createInterfaces();
+    EXPECT_TRUE(manager.getInterfaces().empty());
 }
 // getifaddrs returns single interface.
 TEST_F(TestNetworkManager, WithSingleInterface)