-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix error in Test-AzureRmVMAEMExtension and improve error message #3102
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
Conversation
… standard storage
Hi @MSSedusch, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
TTYL, AZPRBOT; |
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.
@MSSedusch Hey Sebastian, a couple comments. Do you plan on adding test coverage for these changes?
public SwitchParameter DisableWAD { get; set; } | ||
|
||
[Parameter( | ||
Mandatory = false, | ||
Position = 2, |
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.
@MSSedusch switch parameters do not need to have a position. You can remove this from both EnableWAD
and DisableWAD
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.
done
Position = 2, | ||
ValueFromPipelineByPropertyName = false, | ||
HelpMessage = "If this parameter is provided, the commandlet will enable Windows Azure Diagnostics for this virtual machine.")] | ||
public SwitchParameter EnableWAD { get; set; } |
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.
@MSSedusch currently EnableWAD
and DisableWAD
can be called in the same command. Can you create two parameter sets, one that contains EnableWAD
and one that contains DisableWAD
, so that this scenario is not possible?
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.
As far as I know, Parameter Sets need to contain at least one parameter specific to the set. How would I define parameter sets that only differ in those two switch parameters? Only using ResourceGroup and VMName must work. I also don't think this is a real issue. Using both switch parameters work
@MSSedusch oops, I accidently "approved" the changes rather than "requested" them for the review above. I will sign-off when the above comments are resolved. |
Please update the developer documentation especially the part about adding and recording tests if you want people to write tests (e.g. SetupHttpRecordEnv.ps1 does not longer exist in tools directory). |
@MSSedusch You need to have tests in order to meet the requirements for check-in. If you are willing to verify the functionality manually, you can file an issue to add automated tests in the next sprint. Reference this issue here, and we will be able to merge. |
I added four additional tests to cover the new scenarios |
@@ -24,24 +24,48 @@ public AEMExtensionTests(Xunit.Abstractions.ITestOutputHelper output) | |||
} | |||
|
|||
[Fact] |
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.
@MSSedusch Is there a reason why these tests are not marked as check-in tests (Category.AcceptanceType, Category.CheckIn)?
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.
yes, see #2084
The test runtime is too long, hovsepm asked me to remove the checkin attribute
on demand run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1299/ Note that the included tests are not running as part of check-in |
@MSSedusch Hey Sebastian, would you mind taking a look at the comments that Mark left? |
on demand build was successful EDIT: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1303/ |
@markcowl do these changes look good to you? |
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThrough
parameter.Cmdlet Parameter Guidelines
… standard storage