vitess
vitess copied to clipboard
Tracking Issue: vtctldclient/vtctld: Enhance test coverage and code refactor
Description
As part of the vtctldclient migration, we ported over a lot of existing code and wrote new code in the go/vt/vtctl/workflow
package. However the unit test frameworks did not fully transition. While we have added some unit tests since, the current coverage is still very low.
Also we have ended up with some monolithic code, for example go/vt/vtctl/workflow.Server
is the receiver for several helper functions. These can be extracted for better readability/maintability and to make it easier to cover in unit tests. There are also a few large functions that can benefit from method extraction and some object oriented-ness.
This is a tracking issue for reducing the current technical debt with both low level code and test coverage. Given that we have already deprecated vtctl
and will be moving entirely to vtctld
(client
) soon we should address this sooner rather than later.