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

feat: support arg --token when talking to argo-server (#2027) #2089

Merged
merged 9 commits into from
Jan 30, 2020

Conversation

whynowy
Copy link
Member

@whynowy whynowy commented Jan 28, 2020

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I have written unit and/or e2e tests for my change. PRs without these are unlike to be merged.
  • Optional. I've added My organization is added to the README.
  • I've signed the CLA and required builds are green.

Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

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

Looks good so far. Should we have a e2e test?

@@ -42,6 +42,26 @@ func (s *CLISuite) TestToken() {
})
}

func (s *CLISuite) TestTokenArg() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

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

I approve of this .

@whynowy whynowy changed the title feat: support arg --token when talking to argo-server (#2027) [WIP]feat: support arg --token when talking to argo-server (#2027) Jan 29, 2020
@codecov
Copy link

codecov bot commented Jan 29, 2020

Codecov Report

Merging #2089 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2089      +/-   ##
=========================================
+ Coverage    8.89%   8.89%   +<.01%     
=========================================
  Files          61      61              
  Lines       34597   34597              
=========================================
+ Hits         3077    3079       +2     
+ Misses      31132   31131       -1     
+ Partials      388     387       -1
Impacted Files Coverage Δ
util/kubeconfig/kubeconfig.go 14.28% <100%> (+3.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01d8cae...84ca0b8. Read the comment docs.

@whynowy whynowy changed the title [WIP]feat: support arg --token when talking to argo-server (#2027) feat: support arg --token when talking to argo-server (#2027) Jan 29, 2020
@whynowy
Copy link
Member Author

whynowy commented Jan 29, 2020

@alexec - Do you mind reviewing it again since some changes happened since your approval.

test/e2e/cli_test.go Outdated Show resolved Hide resolved
@@ -40,13 +40,14 @@ func GetRestConfig(token string) (*restclient.Config, error) {
// convert the REST config into a bearer token
func GetBearerToken(in *restclient.Config) (string, error) {

if len(in.BearerToken) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@whynowy whynowy merged commit b6a2be8 into argoproj:master Jan 30, 2020
@whynowy whynowy deleted the tokenarg branch January 30, 2020 01:37
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.

3 participants