-
Notifications
You must be signed in to change notification settings - Fork 560
Make cmd more testable by abstracting authArgs and AzureClient #3756
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3756 +/- ##
==========================================
+ Coverage 55.48% 55.79% +0.31%
==========================================
Files 108 108
Lines 16140 16143 +3
==========================================
+ Hits 8955 9007 +52
+ Misses 6420 6347 -73
- Partials 765 789 +24 |
/lgtm pending E2E, thanks @serbrech! |
@serbrech FYI, this looks fine, but it occured to me that our E2E doesn't traverse Let's use this as an excuse to build a 1st class |
added #3776 |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon, jackfrancis, serbrech 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 |
What this PR does / why we need it:
Improve testability of the cmd package by abstracting the authArgs dependency.
This allows tests to stub the
authArgs.getClient()
call and return a fakeACSEngineClient
instead of the concreteAzureClient
instanceSpecial notes for your reviewer:
If this is ok, the same pattern can be applied for other command that depends on the
AzureClient
.