Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

PMM-4743 Allow to pass password individually. #71

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AlekSi
Copy link
Contributor

@AlekSi AlekSi commented Sep 23, 2019

No description provided.

@AlekSi AlekSi self-assigned this Sep 23, 2019
@codecov
Copy link

codecov bot commented Sep 23, 2019

Codecov Report

Merging #71 into master will decrease coverage by 0.19%.
The diff coverage is 3.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage   23.72%   23.52%   -0.20%     
==========================================
  Files          45       45              
  Lines        2778     2805      +27     
==========================================
+ Hits          659      660       +1     
- Misses       2095     2120      +25     
- Partials       24       25       +1     
Flag Coverage Δ
#cover 23.11% <3.33%> (-0.20%) ⬇️
#crosscover 23.52% <3.33%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
commands/base.go 18.64% <0.00%> (-4.04%) ⬇️
main.go 0.00% <0.00%> (ø)
commands/config.go 48.88% <25.00%> (-1.12%) ⬇️

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 2d1a57b...bcecf14. Read the comment docs.

@AlekSi AlekSi marked this pull request as ready for review September 23, 2019 14:54
@AlekSi AlekSi requested a review from BupycHuk as a code owner September 23, 2019 14:54
@@ -154,9 +154,10 @@ func (e errFromNginx) GoString() string {
}

// SetupClients configures local and PMM Server API clients.
func SetupClients(ctx context.Context, serverURL string) {
func SetupClients(ctx context.Context, serverURL, serverUsername, serverPassword string, serverInsecureTLS bool) {

Choose a reason for hiding this comment

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

[golangci-lint] reported by reviewdog 🐶
Function 'SetupClients' is too long (93 > 60) (funlen)

@@ -189,6 +190,29 @@ func SetupClients(ctx context.Context, serverURL string) {
}
}

// override username, password, insecure-tls if given
if serverUsername != "" || serverPassword != "" {

Choose a reason for hiding this comment

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

[golangci-lint] reported by reviewdog 🐶
if serverUsername != "" || serverPassword != "" is deeply nested (complexity: 5) (nestif)

newUsername = GlobalFlags.ServerURL.User.Username()
newPassword, _ = GlobalFlags.ServerURL.User.Password()
}
if serverUsername != "" {

Choose a reason for hiding this comment

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

[golangci-lint] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

if serverUsername != "" {
newUsername = serverUsername
}
if serverPassword != "" {

Choose a reason for hiding this comment

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

[golangci-lint] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

@AlekSi AlekSi removed their assignment Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants