unit-test: ensure distinct dbus objects
sdbusplus recently added some code which ensures duplicate D-Bus objects
are not hosted under the same service. Modify the objects the unit tests
use to ensure they are distinct.
Without this change, three of the unit tests in associations were
failing.
Change-Id: If52dc90d63b92b0e5dbae55c9488fdaec27fad17
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/src/test/associations.cpp b/src/test/associations.cpp
index 50706d7..73c36ed 100644
--- a/src/test/associations.cpp
+++ b/src/test/associations.cpp
@@ -166,7 +166,8 @@
// Verify existing endpoint deleted when empty endpoint is provided
TEST_F(TestAssociations, associationChangedEmptyEndpoint)
{
- std::vector<Association> associations = {{"inventory", "error", ""}};
+ std::vector<Association> associations = {
+ {"inventory_cee", "error_cee", ""}};
interface_map_type interfaceMap;
AssociationMaps assocMaps;
@@ -226,7 +227,7 @@
std::string sourcePath = "/logging/entry/1";
std::string owner = "xyz.openbmc_project.Test";
std::vector<Association> associations = {
- {"inventory", "error",
+ {"inventory_canaeo", "error_canaeo",
"/xyz/openbmc_project/inventory/system/chassis"}};
// Empty objects because this test will ensure assocOwners adds the
@@ -262,7 +263,7 @@
{
std::string newOwner = "xyz.openbmc_project.Test2";
std::vector<Association> associations = {
- {"inventory", "error",
+ {"inventory_canano", "error_canano",
"/xyz/openbmc_project/inventory/system/chassis"}};
// Make it look like the assoc endpoints are on D-Bus
@@ -453,8 +454,9 @@
{DEFAULT_SOURCE_PATH, {{DEFAULT_DBUS_SVC, {"a"}}}},
{DEFAULT_ENDPOINT, {{DEFAULT_DBUS_SVC, {"b"}}}}};
- addPendingAssociation(DEFAULT_SOURCE_PATH, "inventory", DEFAULT_ENDPOINT,
- "error", DEFAULT_DBUS_SVC, assocMaps);
+ addPendingAssociation(DEFAULT_SOURCE_PATH, "inventory_cip",
+ DEFAULT_ENDPOINT, "error_cip", DEFAULT_DBUS_SVC,
+ assocMaps);
EXPECT_EQ(assocMaps.pending.size(), 1);
// Move the pending association to a real association