entry: switch AdditionalData to dict
Clients have been switched to use AddtionalData2, which is a
dictionary. Move AdditionalData also to a dictionary so we
can stage a removal of AdditionalData2.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7cc9591895f219471ac098387f72a35c18e6c750
diff --git a/test/log_manager_dbus_tests.cpp b/test/log_manager_dbus_tests.cpp
index 12136c1..2749e46 100644
--- a/test/log_manager_dbus_tests.cpp
+++ b/test/log_manager_dbus_tests.cpp
@@ -185,21 +185,17 @@
// Extract the NUMBER_OF_LOGS, PID, and CODE_FILE.
for (const auto& value : additionalData)
{
- auto getValue = [&value]() {
- return value.substr(value.find_first_of('=') + 1);
- };
-
- if (value.starts_with("NUMBER_OF_LOGS="))
+ if (value.first == "NUMBER_OF_LOGS")
{
- log_count = getValue();
+ log_count = value.second;
}
- if (value.starts_with("_PID="))
+ if (value.first == "_PID")
{
- pid = std::stoull(getValue());
+ pid = std::stoull(value.second);
}
- if (value.starts_with("_CODE_FILE="))
+ if (value.first == "_CODE_FILE")
{
- source_file = getValue();
+ source_file = value.second;
}
}
}