Commit graph

9 commits

Author SHA1 Message Date
Erin Call 3b85c38714
Test yaml validity without a new dependency [#15]
It turns out testify already depends on yaml, so we aren't adding
anything new by using it here.
2019-12-26 12:53:36 -08:00
Erin Call 2a13fff548
Don't check the generated config's yaml syntax [#13]
See discussion on https://github.com/pelotech/drone-helm3/pull/36 --it
doesn't really make sense to add a dependency on yaml just for testing.
2019-12-26 12:39:02 -08:00
Erin Call 6b331fdf03
Check the validity of the kubeconfig template [#13]
It's a little tricky to find a balance between "brittle" and "thorough"
in this test--I'd like to verify that e.g. the certificate is in
clusters[0].cluster.certificate-authority-data, not at the root. On the
other hand, we can't actually show that it's a valid kubeconfig file
without actually *using* it, so there's a hard upper limit on the
strength of the assertions. I've settled on verifying that all the
settings make it into the file and the file is syntactically-valid yaml.
2019-12-25 10:11:14 -08:00
Erin Call 446c6f1761
Run golint during drone builds 2019-12-09 15:27:56 -08:00
Erin Call 8d66036252
Brush all the lint off this code I wrote in a haze 2019-12-09 10:53:32 -08:00
Erin Call e3051ec72e
Replicate most of drone-helm's config 2019-12-09 09:58:42 -08:00
Erin Call 238ede6f9e
Actual drone-invokable helm commands 2019-12-05 14:35:25 -08:00
Erin Call 990d1856d8
Very rough code that can helm install
The recommended way to test code that uses exec.Cmd involves setting up
a real exec.Cmd that invokes `go test` with additional arguments that
fire off a specially-constructed test that behaves the way the mocked-
out script would be expected to do. It's a sensible way to test exec.Cmd
itself, but for code that merely invokes it, I think it makes more sense
to use actual mocks.
2019-12-04 12:41:37 -08:00
Erin Call ba75a9b1d8
Initial config for building the plugin itself 2019-12-03 09:50:15 -08:00