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

Complete tests for kubectx #113

Merged
merged 1 commit into from
Jan 2, 2019
Merged

Complete tests for kubectx #113

merged 1 commit into from
Jan 2, 2019

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Dec 25, 2018

No description provided.

@ahmetb
Copy link
Owner

ahmetb commented Dec 27, 2018

cc: @doodlesbykumbi your review is appreciated!

test/kubectx.bats Show resolved Hide resolved
test/kubectx.bats Show resolved Hide resolved
test/kubectx.bats Show resolved Hide resolved
test/kubectx.bats Show resolved Hide resolved
}

@test "delete non existent context" {
use_config config2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably can use config1 here (try using simple ones when you can)

test/kubectx.bats Show resolved Hide resolved
test/kubectx.bats Show resolved Hide resolved
@ahmetb
Copy link
Owner

ahmetb commented Jan 2, 2019

Please ping me when it's ready to review again. I'm super happy of this work!

@feloy
Copy link
Contributor Author

feloy commented Jan 2, 2019

github did not detect all changes, but I think it is ok for the next review. Thanks :)

@ahmetb
Copy link
Owner

ahmetb commented Jan 2, 2019

ah btw don't forget to set your git author.name/email fields correctly so they show up on github associated to your profile.

Copy link
Owner

@ahmetb ahmetb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one little nit and almost ready to go 🙏

@feloy
Copy link
Contributor Author

feloy commented Jan 2, 2019

I rebased my commits so they are attached to my github account now.

@ahmetb ahmetb merged commit df557e4 into ahmetb:master Jan 2, 2019
@ahmetb
Copy link
Owner

ahmetb commented Jan 2, 2019

Thanks a lot! This brings us to 19 tests for kubectx alone.

@doodlesbykumbi
Copy link
Contributor

Hey y'all. Sorry, quite late to the game was thoroughly AFK over the new year break. This is amazing work. Well done @feloy!

@ahmetb
Copy link
Owner

ahmetb commented Jan 2, 2019

Hmm looks like we have 24 tests alone in this file. but the test output showed 19 for some reason (both kubectx and kubens) https://travis-ci.org/ahmetb/kubectx/builds/474502614?utm_source=github_status&utm_medium=notification

$ bats test/
1..19
ok 1 no kubectl detected
ok 2 --help should not fail
ok 3 -h should not fail
ok 4 switch to previous context when no one exists
ok 5 list contexts when no kubeconfig exists
ok 6 get one context and list contexts
ok 7 get two contexts and list contexts
ok 8 get two contexts and select contexts
ok 9 get two contexts and switch between contexts
ok 10 get one context and switch to non existent context
ok 11 rename context
ok 12 rename current context
ok 13 delete context
ok 14 delete current context
ok 15 delete non existent context
ok 16 delete several contexts
ok 17 delete several contexts including a non existent one
ok 18 --help should not fail
ok 19 -h should not fail

@doodlesbykumbi
Copy link
Contributor

perhaps we can split the invocations ?

script:
  - echo "kubectx tests:"; bats test/kubectx.bats
  - echo "kubens tests:"; bats test/kubens.bats

@doodlesbykumbi
Copy link
Contributor

@ahmetb i'm confused there's only 19 instances of @test in the repo. where's 24 coming from ?

@ahmetb
Copy link
Owner

ahmetb commented Jan 2, 2019

where's 24 coming from ?

my bad. I was ctrl+f ing the diff view.

ahmetb added a commit that referenced this pull request Jan 28, 2019
- FIX: Show current context/ns color in interactive (fzf) mode. (#109)
- TEST: Add integration tests for kubectx (#111, #113) and kubens (#105, #117)

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants