Closed PeterJCLaw closed 6 years ago
The test failure on the CI is due to https://github.com/sourcebots/robotd/pull/35 not being available in that test environment.
I'm liking this use of fake sockets, hopefully these changes can be backported into the remainder of the tests (separate PR) to reduce the oddness they bring
@RealOrangeOne indeed, I've some thoughts -> #57
After testing on a kit last night I'm confident this works as intended. I would be grateful if the conflicts could be resolved before I approve.
@kierdavis conflicts resolved; please could you take another look?
This adds a new
direct_command
method which takes in a command as a list of JSON-encodable entities and passes that to robotd. It expects to immediately get back a response message (as well as the usual status blob) which contains either valid data from the arduino or a description of the failure.This includes a novel testing approach which:
This avoids real
socket
s andmultiprocessing
, both of which incur substantial overhead during tests along with the introduction of timeouts (which is just nasty).This relies on https://github.com/sourcebots/robotd/pull/35.