summaryrefslogtreecommitdiffstats
path: root/test/test.cpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-02-03 15:17:21 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-02-09 20:37:04 -0500
commit03f4cd957800210c1763605d755904c95f6079f9 (patch)
tree9174957ad3970d9794a76f180d81595dada84094 /test/test.cpp
parenta6fcd567f6aa01746471fd639db63fecadbf166b (diff)
downloadphosphor-inventory-manager-03f4cd957800210c1763605d755904c95f6079f9.tar.gz
phosphor-inventory-manager-03f4cd957800210c1763605d755904c95f6079f9.zip
Link with libphosphor_dbus
Link with libphosphor_dbus. Update the manager implementation to match the new server binding in libphosphor_dbus (bool types for notify and notify signature change). Change-Id: I033d224965caf737591e363b3e2fd666605bff13 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'test/test.cpp')
-rw-r--r--test/test.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/test/test.cpp b/test/test.cpp
index 6ffad51..0a941f7 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -26,6 +26,9 @@
using namespace std::literals::chrono_literals;
using namespace std::literals::string_literals;
+using Object = phosphor::inventory::manager::Object;
+using ObjectMap = std::map<sdbusplus::message::object_path, Object>;
+
constexpr auto MGR_SERVICE = "phosphor.inventory.test.mgr";
constexpr auto MGR_INTERFACE = IFACE;
constexpr auto MGR_ROOT = "/testing/inventory";
@@ -94,7 +97,6 @@ struct ExampleService
sdbusplus::server::manager::manager objmgr;
};
-using Object = phosphor::inventory::manager::Object;
/** @class SignalQueue
* @brief Store DBus signals in a queue.
@@ -201,11 +203,11 @@ void runTests()
{
{
"xyz.openbmc_project.Example.Iface1",
- {{"ExampleProperty1", "test1"}}
+ {{"ExampleProperty1", "test1"s}}
},
{
"xyz.openbmc_project.Example.Iface2",
- {{"ExampleProperty2", "test2"}}
+ {{"ExampleProperty2", "test2"s}}
},
};
@@ -236,8 +238,7 @@ void runTests()
"path='" + root + "',member='InterfacesAdded'");
auto m = notify();
- m.append(relPath);
- m.append(obj);
+ m.append(ObjectMap({{relPath, obj}}));
b.call(m);
auto sig{queue.pop()};
@@ -257,8 +258,7 @@ void runTests()
// Create an object to be deleted.
{
auto m = notify();
- m.append(relDeleteMeThree);
- m.append(obj);
+ m.append(ObjectMap({{relDeleteMeThree, obj}}));
b.call(m);
}
@@ -330,20 +330,17 @@ void runTests()
// Create some objects to be deleted by an action.
{
auto m = notify();
- m.append(relDeleteMeOne);
- m.append(obj);
+ m.append(ObjectMap({{relDeleteMeOne, obj}}));
b.call(m);
}
{
auto m = notify();
- m.append(relDeleteMeTwo);
- m.append(obj);
+ m.append(ObjectMap({{relDeleteMeTwo, obj}}));
b.call(m);
}
{
auto m = notify();
- m.append(relDeleteMeThree);
- m.append(obj);
+ m.append(ObjectMap({{relDeleteMeThree, obj}}));
b.call(m);
}
@@ -448,8 +445,7 @@ void runTests()
// Create an object to be updated by the set property action.
{
auto m = notify();
- m.append(relChangeMe);
- m.append(obj);
+ m.append(ObjectMap({{relChangeMe, obj}}));
b.call(m);
}
OpenPOWER on IntegriCloud