-
Notifications
You must be signed in to change notification settings - Fork 4k
Added Get-AzureRMAutomationHybridRunbookWorkerGroup cmdlet #2325
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
Hi @robplank, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution! TTYL, AZPRBOT; |
Can one of the admins verify this patch? |
@robplank There are merge conflicts, please update @jodoglevy Can someone from the automation team review this PR? |
@robplank, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
Updates to Get-HybridRunbookWorkerGroup cmdlet more updates to the Get-hybridRunbookWorkerGroup cmdlet Final updates to Get-AzureRMAutomationHybridRunbookWorkerGroup fixed reference name
@markcowl @jodoglevy merge conflicts are resolved |
this.AutomationAccountName = accountName; | ||
//this.ID = hybridRunbookWorkerGroup.Id; | ||
this.Name = hybridRunbookWorkerGroup.Name; | ||
//this.Credential = hybridRunbookWorkerGroup.Credential; |
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.
Remove if the commented lines are not needed
@felixcho-msft @safeermohammed Requested updates have been made |
</maml:description> | ||
<command:parameterValue required="true" variableLength="false">String</command:parameterValue> | ||
</command:parameter> | ||
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named"> |
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.
InformationAction and InformationVariable are common parameters in PowerShell 5. No need to document.
@robplank I may not be reading the latest commits properly, but should I be seeing diff's where the merge conflicts are resolved? |
I don't see any merge conflicts, please let me know if you are sure there is a conflict that still exists after my update to the pull request yesterday. |
@felixcho-msft help file has been updated, let me know if you see anything else that needs to be fixed |
@@ -42,6 +42,15 @@ | |||
using Runbook = Microsoft.Azure.Commands.Automation.Model.Runbook; | |||
using Schedule = Microsoft.Azure.Commands.Automation.Model.Schedule; | |||
using Variable = Microsoft.Azure.Commands.Automation.Model.Variable; | |||
<<<<<<< 5a3f20949198c648832d7ae2bed4ba88898a4a3d |
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.
@robplank Re: conflicts
I still see these in AutomationClient.cs:
<<<<<<< 5a3f20949198c648832d7ae2bed4ba88898a4a3d
I think I see it in 2 places?
@felixcho-msft I removed those two lines. |
@azuresdkci add to whitelist |
please don't merge yet, I will review today |
Don’t worry. We missed the cut-off date. They will merge for next release.
From: Joe Levy [mailto:[email protected]] please don't merge yet, I will review today — |
[OutputType(typeof(HybridRunbookWorkerGroup))] | ||
public class GetAzureAutomationHybridWorkerGroup : AzureAutomationBaseCmdlet | ||
{ | ||
[Parameter(ParameterSetName = AutomationCmdletParameterSets.ByName,Position = 2, Mandatory = false, ValueFromPipeline = true, HelpMessage = "The Hybrid Runbook Worker Group Name")] |
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.
name should be lowercase in the help message
@robplank @felixcho-msft @jodoglevy Not to throw a wrench in the works, but I don't see any tests for the new cmdlet. Are we planning to add tests? It's OK if we add them separately, later in the sprint, I just want to know what the plan is for testing the new cmdlet. |
@robplank @felixcho-msft @jodoglevy ping? Not knowing the testing strategy here will prevent us from merging this PR. |
@markcowl do you just need a unit test added? I don't see how the test are called |
@markcowl unit test created, let me know if I am missing anything else |
@@ -102,7 +102,9 @@ | |||
<SpecificVersion>False</SpecificVersion> | |||
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | |||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> |
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.
@robplank We no longer accept MSTest tests - please convert this to xunit, and you will be good. Mainly this is just re-attributing the methods, as the model for tests is largely the same
@robplank Thanks for going above and beyond with this contribution. I think the feature team may want to add an end-to-end test, but I will not gate on that. I hate tpo ask for anything additional, but we have stopped allowing new MSTest tests, as there is significant overhead in running them, and some compatibility concenrs. If you convert this to xunit, and mark these as Check-in tests
we will be able to merge. |
@markcowl let me know if the changes are not correct. |
@@ -19,7 +21,8 @@ public class GetAzureAutomationHybridWorkerGroupTest : RMTestBase | |||
|
|||
private GetAzureAutomationHybridWorkerGroup cmdlet; | |||
|
|||
[TestInitialize] | |||
[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.
@robplank Not quite. This depends on test execution order, which may vary from test run to test run. There are two options for test setup in xunit:
Option 1: setup that runs at the start of each test in the class - in this case, just use the constructor, the class constructor for the test class automatically runs at the start of each test. There is no need for adding any attributes in this case, if this is what you want, removing the attributes from the constructor will do the appropriate thing here.
Option 2: setup that runs only once before any tests in the class are executed. For this, use the IClassFixtiure pattern. You can find a good example of this here:
Line 31 in 83203f0
public KeyVaultManagementTests(KeyVaultTestFixture fixture) |
The mechanisms for test seup are described in detail here: https://xunit.github.io/docs/shared-context.html if you are interested.
@markcowl please check that latest commit |
@robplank. I opened a PR against your branch that actually enables these tests as part of check-in, can you take a look - it would automatically be added to this PR if you merge |
Thanks @markcowl , the PR has been merged |
@robplank It looks like merge conflicts have crept in, can you update the PR? Most likely this was caused by merging another PR that updated the test targets, so just accepting the upstream changes should work. |
@markcowl @felixcho-msft @safeermohammed if the build error is something I need to fix please let me know what the error is. |
@azuresdkci retest this please |
@robplank it is not something you need to worry about. It is one of four flaky tests in the check-in tests |
@robplank thanks Rob for these new cmdlets |
No description provided.