summaryrefslogtreecommitdiffstats
path: root/src/test/util
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2019-02-11 20:20:40 -0600
committerMatt Spinler <spinler@us.ibm.com>2019-04-05 15:05:32 +0000
commit2067926a03284fae98203c99f8a5d9acda0d2a47 (patch)
treebc606ebd4988ec57b67e15abc5d83c22c964d849 /src/test/util
parent5b2e72765e4f547dd74a139f703c957c41a9078a (diff)
downloadphosphor-objmgr-2067926a03284fae98203c99f8a5d9acda0d2a47.tar.gz
phosphor-objmgr-2067926a03284fae98203c99f8a5d9acda0d2a47.zip
unit-test: Test deleting entry on name change
Breaking off into a separate function enables easier unit testing of the specific function Testing: 97% coverage of processing.cpp Change-Id: I08f229657a8f44230b711fabbae20fb403792637 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/association_objects.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/util/association_objects.hpp b/src/test/util/association_objects.hpp
index 081f891..45b89d6 100644
--- a/src/test/util/association_objects.hpp
+++ b/src/test/util/association_objects.hpp
@@ -1,4 +1,5 @@
#include "src/associations.hpp"
+#include "src/processing.hpp"
const std::string DEFAULT_SOURCE_PATH = "/logging/entry/1";
const std::string DEFAULT_DBUS_SVC = "xyz.openbmc_project.New.Interface";
@@ -45,3 +46,15 @@ void addEndpointToInterfaceAssociation(AssociationInterfaces& interfaceAssoc)
auto endpoints = std::get<endpointsPos>(iface);
endpoints.push_back(EXTRA_ENDPOINT);
}
+
+// Create a default interface_map_type with input values
+interface_map_type createInterfaceMap(
+ const std::string& path, const std::string& connection_name,
+ const boost::container::flat_set<std::string>& interface_names)
+{
+ boost::container::flat_map<std::string,
+ boost::container::flat_set<std::string>>
+ connectionMap = {{connection_name, interface_names}};
+ interface_map_type interfaceMap = {{path, connectionMap}};
+ return interfaceMap;
+}
OpenPOWER on IntegriCloud