Activation: Delete version interface after activation
When activation is finished, the version interface and the related
images created by phosphor-version-software-manager shall be deleted.
This is done by invoking the Delete method of the related service, so we
need to get all the services from the object, and get the correct
service to invoke the Delete method.
Tested: Verify the Version interface created by
xyz.openbmc_project.Software.Version service, and the related
files in /tmp/image/<versionId> are removed after activation is
completed.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Icb14731bbea35175c2519bd40b9f88a0b54a034a
diff --git a/test/mocked_utils.hpp b/test/mocked_utils.hpp
index 88fdcf2..7afe07c 100644
--- a/test/mocked_utils.hpp
+++ b/test/mocked_utils.hpp
@@ -17,6 +17,11 @@
std::string(sdbusplus::bus::bus& bus, const char* path,
const char* interface));
+ MOCK_CONST_METHOD3(getServices,
+ std::vector<std::string>(sdbusplus::bus::bus& bus,
+ const char* path,
+ const char* interface));
+
MOCK_CONST_METHOD1(getVersionId, std::string(const std::string& version));
MOCK_CONST_METHOD1(getVersion,