File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ class Discovery : public Service {
2727 public:
2828 // / @brief Discover valid viam configuration of resources that are physically
2929 // / connected to your machine.
30- // / @ingroup Discovery
30+ // / @return array of potential viam configurations for hardware physically
31+ // / connected to your viam server
3132 inline std::vector<ResourceConfig> discover_resources () {
3233 return discover_resources ({});
3334 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ std::vector<sdk::ResourceConfig> MockDiscovery::discover_resources(const sdk::Pr
1414}
1515
1616ProtoStruct MockDiscovery::do_command (const sdk::ProtoStruct& command) {
17- return ProtoStruct{} ;
17+ return fake_map () ;
1818}
1919
2020} // namespace discovery
Original file line number Diff line number Diff line change @@ -27,8 +27,12 @@ BOOST_AUTO_TEST_CASE(test_discover_resources) {
2727BOOST_AUTO_TEST_CASE (test_do_command) {
2828 auto mock = std::make_shared<MockDiscovery>(" mock_discovery" );
2929 client_to_mock_pipeline<Discovery>(mock, [&](Discovery& client) {
30- const auto ret = client.do_command ({});
31- BOOST_CHECK_EQUAL (ret.size (), 0 );
30+ ProtoStruct expected = fake_map ();
31+
32+ ProtoStruct command = fake_map ();
33+ ProtoStruct result_map = client.do_command (command);
34+
35+ BOOST_CHECK (result_map.at (" test" ) == expected.at (" test" ));
3236 });
3337}
3438
You can’t perform that action at this time.
0 commit comments