14 Commits

Author SHA1 Message Date
Ian H. Pittwood
8a3950d238 Fix typos in variable names and comments
Change-Id: I361916cc18c67e72fbfdbb4b6547f80a5d098327
2020-02-05 16:31:05 -06:00
Ian Howell
51b1e86ad9 Fix flag loading order
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
2020-01-15 13:04:16 -06:00
Ian Howell
d775b2159a This updates the current unit tests for testify
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
2019-11-07 12:15:06 -06:00
Ian Howell
1c999e2095 Add coverage checks
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
2019-08-15 11:11:51 -05:00
Ian Howell
6e41a56a7d Rename module to reflect its new location
Change-Id: I5c8c524c4d3f569b21b5b829722b3c49952cb0ab
2019-07-01 12:15:29 -05:00
Ian Howell
e4b45002c9 Enable the linter, and fix uncovered linting issues
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
2019-05-30 10:02:54 -05:00
Ian Howell
3dae793f70 Remove unnecessary arg parsing from tests 2019-05-29 15:15:01 -05:00
Ian Howell
4c6b8486c9 Move all tests to proper table-tests
This commit also changes the way that output is handled while testing
2019-05-29 15:11:55 -05:00
Ian Howell
19f28e278b Cleanup how settings are passed 2019-05-24 15:38:59 -05:00
Ian Howell
75b753b2c3 Remove the dependency on Argo
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
2019-05-24 14:34:33 -05:00
Ian Howell
6aa9b3809b Fix old unit tests
These are going to need to be revisited.
2019-05-24 08:47:49 -05:00
Ian Howell
7a34fd98d9 Change airshipadm to airshipctl 2019-05-07 10:07:54 -05:00
Ian Howell
d26c6c76a1 Update the way golden files are updated 2019-05-01 16:56:42 -05:00
Ian Howell
131355333a Add unit test for root 2019-05-01 15:36:58 -05:00