Description
Unit test coverage for the ctl
package mostly consists of checking correct usage of the commands e.g. all required flags are specified, the command throws validation errors if incorrect flags or flags that shouldn't be combined are being provided, etc. (i.e. only validation related bits). While the ctl
package is usually not doing much more than that, there are exceptions. E.g. the create iamserviceaccount
command sets up a filter to decide whether to override or not existing service accounts.
Our tests should ideally cover such pieces of functionality as-well. Most of this logic however is being written at some point after initialising the cluster provider.
We should investigate if there's a reasonable way to mock the provider and then increase test coverage, separately, for each relevant command.
As part of this spike we should also determine if there still are commands completely missing unit test coverage.
Timebox: 1-2 days