Open alexppg opened 3 years ago
I'm not quite sure how or even if it's worth testing the kubeconfig validation ourselves... given that we're having k8s.io/client-go/tools/clientcmd
handle the parsing... it's doing it's own validation itself, so I think handling the error appropriately is probably the right path forward here.
Unless you mean a kind
type test of some sort and validating that we don't get a panic?
You maybe didn't see it because I didn't have activated the actions for PR forks, but there's some tests. The unitary, which as you say wouldn't make much sense to test. But there's also integration tests with https://github.com/bats-core/bats-core. It may make sense to add a test that messes the kubeconfig and ensures that it fails gracefully. It would go here: https://github.com/little-angry-clouds/kubernetes-binaries-managers/blob/master/tests/wrappers.test
See https://github.com/little-angry-clouds/kubernetes-binaries-managers/pull/26/.