bluerobotics / mavlink-server

Ultimate MAVLink server, with support to: REST API, WebSocket, UDP, TCP, Serial, TLog and more!
MIT License
10 stars 4 forks source link

Fix cli on tests #102

Closed joaoantoniocardoso closed 3 days ago

joaoantoniocardoso commented 3 days ago

This will allow us to fix the test errors introduced by #101.

The problem happens when a test code calls any of the functions of the cli module, which then makes the lazy_static to create cli::Args from the commandline of the binary being executed, conflicting with the test harness/setup.

This change allows us to define the parsed cli::Args so that it won't conflict with the arguments being passed to the test harness/setup.

.. yeah, this is a drawback of singletons using lazy_static.