-
Notifications
You must be signed in to change notification settings - Fork 558
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## master #2997 +/- ##
==========================================
+ Coverage 50.74% 51.31% +0.56%
==========================================
Files 97 97
Lines 14689 14688 -1
==========================================
+ Hits 7454 7537 +83
+ Misses 6536 6450 -86
- Partials 699 701 +2
Continue to review full report at Codecov.
|
return nil | ||
} | ||
|
||
func (dc *deployCmd) load(cmd *cobra.Command, args []string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small refactor here -> split validate and load into two separate functions
@@ -72,6 +73,123 @@ func getAPIModelWithoutServicePrincipalProfile(baseAPIModel string, useManagedId | |||
strconv.FormatBool(useManagedIdentity)) | |||
} | |||
|
|||
func TestNewDeployCmd(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit_test_coverage++
/lgtm (testing the bot) |
@CecileRobertMichon: you cannot LGTM your own PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -100,21 +85,6 @@ var _ = Describe("the upgrade command", func() { | |||
deploymentDirectory: "_output/mydir", | |||
upgradeVersion: "1.9.0", | |||
location: "southcentralus", | |||
authArgs: authArgs{}, | |||
}, | |||
expectedErr: fmt.Errorf("--subscription-id is required (and must be a valid UUID)"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved validateAuthArgs to load() so we don't check for subID in validate anymore
cmd/scale.go
Outdated
} | ||
|
||
func (sc *scaleCmd) run(cmd *cobra.Command, args []string) error { | ||
sc.validate(cmd, args) | ||
if err := sc.validate(cmd); err != nil { | ||
log.Fatalln("failed to validate scale command: %s", err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't want to return here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do... I left the run function for another day because it has a ton of those but I'll fix that one since I added it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind I just fixed all of them
/lgtm |
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #2913Special notes for your reviewer:
If applicable:
Release note: