* Vendor github.com/pkg/errors
This makes it much easier to track down where a test failed
* Enable running a command directly from a test
* Add failing test for svcat get brokers
* Rely on go 1.9 to only run non-vendored tests
Not a huge deal regardless, because dep prune removes tests from vendor.
* Prototype unit test structure for testing the cli
There are some changes here (notably the constructor for
output.NewListTable2) that won't survive but allowed me to avoid
changing the entire CLI while considering the design.
* Explain how to run tests in the contributing guide
* Compile with go 1.9
This helps with our unit testing adding support for
* go test ./... (which no longer hits vendor/)
* t.Helper() which fixes stack traces for asserts
* Note that Go 1.9 is required
* Enable passing --kubeconfig from unit tests
Previously we were loading the kubeconfig before the command was
executed and read directly from os.Args. Now we wait for cobra to parse
the command/args, and then load the kubeconfig.
* Use fake k8s api during tests
The test http handler returns canned responses based on the URL.
Anything more complicated should be an integration test.
* Remove commented out cert settings from fake kubeconfig
* Always print to the testable output
* Sweep for fmt.Print* and swap with fmt.Fprint*
* Remove loggers so that all output goes to the same writer
* Fix failing unit test
I ran go test ./... --update=true
ok github.com/Azure/service-catalog-cli/cmd/svcat 0.066s
? github.com/Azure/service-catalog-cli/internal/test [no test files]
? github.com/Azure/service-catalog-cli/pkg/binding [no test files]
? github.com/Azure/service-catalog-cli/pkg/broker [no test files]
? github.com/Azure/service-catalog-cli/pkg/class [no test files]
? github.com/Azure/service-catalog-cli/pkg/command [no test files]
? github.com/Azure/service-catalog-cli/pkg/environment [no test files]
? github.com/Azure/service-catalog-cli/pkg/instance [no test files]
? github.com/Azure/service-catalog-cli/pkg/kube [no test files]
? github.com/Azure/service-catalog-cli/pkg/output [no test files]
? github.com/Azure/service-catalog-cli/pkg/plan [no test files]
? github.com/Azure/service-catalog-cli/pkg/traverse [no test files]
* Add contributing and reviewing guides
These were sourced from github.com/Azure/azure-service-broker and the
names changed. The only major changes was that I removed a reviewer
responsibility for not breaking the OSB API since it did not apply.
* Link to contributing from README
* Include backwards compatibility in reviewers guide