buffet: Added PropValue <-> DBus Variant (Any) conversion
GCD object schema has been used predominantly with JSON values.
Now in order to make it easier to enable GCD data transfer over
D-Bus, we need to have more comprehensive utilities to marshal
GCD data over D-Bus. Specifically, GCD Object type should be sent
over D-Bus as "a{sv}".
Added PropValueToDBusVariant() and PropValueFromDBusVariant() to
convert between D-Bus types and GCD object schema types.
BUG=chromium:415364
TEST=FEATURES=test emerge-link buffet
Change-Id: Ib9feae3a12b499e6a196cb22d2f9736bb824afbe
Reviewed-on: https://chromium-review.googlesource.com/219136
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/commands/command_instance_unittest.cc b/buffet/commands/command_instance_unittest.cc
index 1afd8c7..56c9023 100644
--- a/buffet/commands/command_instance_unittest.cc
+++ b/buffet/commands/command_instance_unittest.cc
@@ -168,7 +168,7 @@
first->GetMessage());
auto inner = error->GetInnerError();
EXPECT_EQ("invalid_parameter_value", inner->GetCode());
- EXPECT_EQ("Invalid parameter value for property 'volume'",
+ EXPECT_EQ("Invalid value for property 'volume'",
inner->GetMessage());
EXPECT_EQ("command_failed", error->GetCode());
EXPECT_EQ("Failed to validate command 'robot.speak'", error->GetMessage());