Remove object schema parsing in CommandDefinition The only thing we now care about in CommandDefinition is the "minimalRole" field. Everything else is a black-box which we just forward to the server without any semantic parsing. Also completely removed command visibility support since it no longer applies to trait/component model. BUG: 25841230 Change-Id: Ie8fff57ffada289caa7876c2a53150bb116fd65b Reviewed-on: https://weave-review.googlesource.com/1617 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/src/commands/command_queue_unittest.cc b/src/commands/command_queue_unittest.cc index 5060071..a9e953e 100644 --- a/src/commands/command_queue_unittest.cc +++ b/src/commands/command_queue_unittest.cc
@@ -20,11 +20,15 @@ class CommandQueueTest : public testing::Test { public: + CommandQueueTest() { + command_definition_ = CommandDefinition::FromJson({}, nullptr); + } + std::unique_ptr<CommandInstance> CreateDummyCommandInstance( const std::string& name, const std::string& id) { std::unique_ptr<CommandInstance> cmd{new CommandInstance{ - name, Command::Origin::kLocal, &command_definition_, {}}}; + name, Command::Origin::kLocal, command_definition_.get(), {}}}; cmd->SetID(id); return cmd; } @@ -39,8 +43,7 @@ CommandQueue queue_; private: - CommandDefinition command_definition_{ - ObjectSchema::Create(), ObjectSchema::Create(), ObjectSchema::Create()}; + std::unique_ptr<CommandDefinition> command_definition_; }; // Keeps track of commands being added to and removed from the queue_.