Create objects for running PSUs
On service startup, create activation and version objects for running
PSUs, and set related active, functional associations.
If multiple PSUs are running with the same software version, they share
the same DBus object, and the object will be associated to multiple PSU
inventories.
Tested: Verify the software objects are created on Witherspoon, and the
active, functional associations are created.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ia8372aba8299818baccfdf37e98fdbc99f747b7c
diff --git a/test/meson.build b/test/meson.build
index 4d644cf..6d82b5d 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -34,6 +34,7 @@
phosphor_logging,
phosphor_dbus_interfaces,
sdbusplus,
+ ssl,
])
test('all', utest)
diff --git a/test/test_utils.cpp b/test/test_utils.cpp
index 08eecf7..a623cf5 100644
--- a/test/test_utils.cpp
+++ b/test/test_utils.cpp
@@ -60,3 +60,13 @@
EXPECT_EQ(path0, ret[0]);
EXPECT_EQ(path1, ret[1]);
}
+
+TEST(Utils, GetVersionID)
+{
+
+ auto ret = utils::getVersionId("");
+ EXPECT_EQ("", ret);
+
+ ret = utils::getVersionId("some version");
+ EXPECT_EQ(8u, ret.size());
+}