Open Thutm opened 5 years ago
For testing, I need to add a mock AWS ARN string to be returned on by kubectl. Should I add to the existing tests or just duplicate all the current tests referencing "minikube"? I can't think of any reasons for additional mock strings to test against and didn't want to unnecessarily update all existing tests.
Hi @Thutm ,
Thanks for the PR. I am a fan of one test per use-case, so please add some new tests. I think it will be enough to add a positive and a negative test.
Thanks all, I actually ended up using:
cur_ctx=${cur_ctx#*:*:*:*:*:}; cur_ctx=${cur_ctx:8}
and then updated it to dritters suggestion. Let me know if that works.
Attached segment screenshot. No terraform specific icon that I could find. Used a globe instead for now.
This is an enhancement to the existing kubecontext segment. While using AWS EKS kubeconfig's this will strip the cluster name out of the ARN to stop bloating your command line.
Before:
After: