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

fix k8s context checking #331

Closed
wants to merge 2 commits into from

Conversation

bobsoppe
Copy link
Contributor

Fixes the check if any k8s context has been set

Bug was introduced in commit 12f9e99 from pull request #330 where the check was changed to support fish <= 3.3.1.

@edouard-lopez
Copy link
Member

Could you add a test in https://github.com/pure-fish/pure/blob/master/tests/_pure_prompt_k8s.test.fish to describe the behavior you expect?

before_each
@test "_pure_prompt_k8s: print nothing when context is missing" (
    set --universal pure_enable_k8s true
    set --universal pure_symbol_k8s_prefix ''

    # TODO
    # mock `kubectl` response
    # see https://github.com/pure-fish/pure/blob/master/tests/mocks/README.md#mocking

    _pure_prompt_k8s
) = $EMPTY

You can also check https://github.com/pure-fish/pure/blob/master/tests/_pure_k8s_namespace.test.fish and https://github.com/pure-fish/pure/blob/master/tests/_pure_k8s_context.test.fish

@edouard-lopez
Copy link
Member

Hello, Could you resolve conflicts and add the tests?

@edouard-lopez
Copy link
Member

@bobsoppe I don't have permission on your repo to do the rebase myself, could you do it so we can merge?

@edouard-lopez
Copy link
Member

@bobsoppe As I can't rebase your branch, I will duplicate your fork

@edouard-lopez
Copy link
Member

closing in favour of #334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants