buffet: Allow tests to pass in a path to search for command definitions
This allows us to dynamically generate commands to test Buffet with at
runtime. The read only nature of the file system makes this difficult
with just the statically configured files.
BUG=brillo:172
TEST=unittests, buffet_Registration passes with this change.
Change-Id: I54a92edadbb5c8a5ebad63b8464d87bb21ba5aa2
Reviewed-on: https://chromium-review.googlesource.com/249440
Tested-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
diff --git a/buffet/device_registration_info.cc b/buffet/device_registration_info.cc
index fb530b9..31fb7b6 100644
--- a/buffet/device_registration_info.cc
+++ b/buffet/device_registration_info.cc
@@ -34,17 +34,16 @@
namespace buffet {
namespace storage_keys {
-// Statically configured fields
-const char kApiKey[] = "api_key";
+// Persistent keys
const char kClientId[] = "client_id";
const char kClientSecret[] = "client_secret";
+const char kApiKey[] = "api_key";
+const char kRefreshToken[] = "refresh_token";
+const char kDeviceId[] = "device_id";
const char kOAuthURL[] = "oauth_url";
const char kServiceURL[] = "service_url";
-// Credentials related to a particular registration.
-const char kDeviceId[] = "device_id";
-const char kRefreshToken[] = "refresh_token";
const char kRobotAccount[] = "robot_account";
-// Fields in our device metadata.
+// Transient keys
const char kDeviceKind[] = "device_kind";
const char kName[] = "name";
const char kDisplayName[] = "display_name";