Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests to check that oc and kubectl configuration are valid #27

Open
alexppg opened this issue Jul 30, 2021 · 2 comments
Open

Add tests to check that oc and kubectl configuration are valid #27

alexppg opened this issue Jul 30, 2021 · 2 comments
Labels

Comments

@alexppg
Copy link
Member

alexppg commented Jul 30, 2021

See #26.

@TyBrown
Copy link
Contributor

TyBrown commented Jul 31, 2021

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?

@alexppg
Copy link
Member Author

alexppg commented Jul 31, 2021

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

@alexppg alexppg added the tests label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants