Prior to this change, flags associated with the Config object were being
read too early (that is, before cobra had parsed them). They are now
read just in time for command execution.
Change-Id: I0affca9429867eb25db40f8323403e0f6976b47b
This commit removes any assertion from Go's "testing" package,
preferring instead to use an assertion from the testify package. All
tests now have uniformity.
This also decrease the number of iterations in the password generation
test, decreasing test runtime tenfold
Change-Id: I8799110e93dfa19bebe9050528e865b4c991c3df
This commit adds a makefile target for generating a report for unit test
coverage. It also adds the coverage_check tool to assert that the actual
test coverage meets the specified requirement.
This also improves various aspects of the testing utilities:
* The "test" package has been renamed to "testutil"
* The "Objs" member has been removed from the CmdTest object
* The "Cmd" member has been added to the CmdTest object. This allows
testing of multiple variants of a root airshipctl command
Finally, this commit includes additional tests for root.go. These are
required in order to meet the required coverage threshold.
Change-Id: Id48343166c0488c543a405ec3143e4a75355ba43
This uses the current master commit of golangci-lint. We will want to
update to use a tagged version as soon as the golangci-lint team pushes
a new tag
Much of the code here has simply been copied over from the Argo
repository and then modified to work with the desired version of
client-go. We'll need to look into using client-gen in order to maintain
this