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
* Remove the unused SCRIPTS_DIR variable
* Make bracket/parenthesis usage consistent
* Add the delete-golden target and add it as a pre-req for
update-golden. This will help to keep the testdata directories from
accruing bloat
Change-Id: Ie4b7377872d48371e5e134fe18ed9347e89b7c70
This adds the .golangci.example.yaml, allowing for more precise control
over how linting is done.
This configuration is highly opinionated and is subject to change.
Change-Id: Ida13bf0dca12e152b75427f5060ad4931e426c72
This adds Ansible playbooks to install kubernetes using minikube and
then assert that airshipctl is able to communicate with the cluster.
Change-Id: Ice5cf3de8d9192d508c79c68caf8f5a61896da9c
Signed-off-by: Pete Birley <pete@port.direct>
The deletions from the go.mod in this change were a relic of an earlier
change, where the k8s-code-generator was being used to generated client
code for Argo workflows. Now that Argo has been properly integrated into
the project, this is no longer needed.
These deletions were caught by a `go mod tidy`
Change-Id: I3e9f115dc31ef30dee59ddeeee513282bc555fcf
This PS adds the skeleton for a set of zuul checks and gates for
airshipctl and removes the travis config.
This PS also removes some dead code from the util package. This change
is required to get unit tests passing.
Change-Id: Ifb1be49cb1bb82c62a0085b6da9b8ff1b261a95b
This is a drop-in of the argo cmd package, with some slight tweaks to
adhere to airshipctl's models and linter. It still needs to be combed
over and modified to meet airshipctl's needs, as well as requiring unit
tests
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