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

Conversation

@feloy
Copy link
Contributor

commented Dec 25, 2018

No description provided.

@googlebot googlebot added the cla: yes label Dec 25, 2018

@ahmetb

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
@ahmetb

ahmetb Dec 27, 2018

Owner

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

This comment has been minimized.

Copy link
Owner

commented Jan 2, 2019

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

@feloy

This comment has been minimized.

Copy link
Contributor Author

commented Jan 2, 2019

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

@ahmetb

This comment has been minimized.

Copy link
Owner

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.

test/kubectx.bats Show resolved Hide resolved
@ahmetb
ahmetb approved these changes Jan 2, 2019
Copy link
Owner

left a comment

one little nit and almost ready to go 🙏

@feloy feloy force-pushed the feloy:bats4 branch from 4868074 to 856428e Jan 2, 2019

@feloy

This comment has been minimized.

Copy link
Contributor Author

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

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ahmetb

This comment has been minimized.

Copy link
Owner

commented Jan 2, 2019

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

@doodlesbykumbi

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2019

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

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2019

perhaps we can split the invocations ?

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

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2019

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

@ahmetb

This comment has been minimized.

Copy link
Owner

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
v0.6.3
- 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
Projects
None yet
4 participants
You can’t perform that action at this time.