-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Update Automation Module cmdlets to support Powershell7.2 #23482
Conversation
️✔️Az.Accounts
|
Type | Title | Current Coverage | Description |
---|---|---|---|
Test Coverage Less Than 50% | 38.00 % | Test coverage for the module cannot be lower than 50%. |
⚠️ - MacOS
Type | Title | Current Coverage | Description |
---|---|---|---|
Test Coverage Less Than 50% | 38.00% | Test coverage for the module cannot be lower than 50%. |
⚠️ PowerShell Core - Windows
Type | Title | Current Coverage | Description |
---|---|---|---|
Test Coverage Less Than 50% | 38.00% | Test coverage for the module cannot be lower than 50%. |
⚠️ Windows PowerShell - Windows
Type | Title | Current Coverage | Description |
---|---|---|---|
Test Coverage Less Than 50% | 38.00% | Test coverage for the module cannot be lower than 50%. |
adf50ad
to
2fd4ee2
Compare
Hi @sushil490023 To pass the CI pipelines:
|
public Module GetPowerShell72Module(string resourceGroupName, string automationAccountName, string name) | ||
{ | ||
try | ||
{ | ||
var module = | ||
this.automationManagementClient.Module.Get(resourceGroupName, automationAccountName, name); | ||
return new Module(resourceGroupName, automationAccountName, module); | ||
} | ||
catch (ErrorResponseException cloudException) | ||
{ | ||
if (cloudException.Response.StatusCode == System.Net.HttpStatusCode.NotFound) | ||
{ | ||
throw new ResourceNotFoundException(typeof(Module), | ||
string.Format(CultureInfo.CurrentCulture, Resources.ModuleNotFound, name)); | ||
} | ||
|
||
throw; | ||
} | ||
} |
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.
I didn't see any difference between this function and L352-L370. Could you explain why a new set of PowerShell72 is needed?
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.
I have Updated the function. Thanks for pointing it
This PR was labeled "needs-revision" because it has unresolved review comments or CI failures. |
|
7e0bb09
to
9f0e1a3
Compare
Hi @NoriZC ,
Recording these end-to-end (E2E) test cases requires setting up resources, which will take some time. We are actively working on adding these test cases with a subsequent pull request (PR) along with Abhimanyu Varma and Sanjeev Kumar.
Thanks |
public Module GetModule(string resourceGroupName, string automationAccountName, string name)
{
try
{
var module =
+ this.automationManagementClient.Module.Get(resourceGroupName, automationAccountName, name);
return new Module(resourceGroupName, automationAccountName, module);
}
catch (ErrorResponseException cloudException)
{
if (cloudException.Response.StatusCode == System.Net.HttpStatusCode.NotFound)
{
throw new ResourceNotFoundException(typeof(Module),
string.Format(CultureInfo.CurrentCulture, Resources.ModuleNotFound, name));
}
throw;
}
} public Module GetPowerShell72Module(string resourceGroupName, string automationAccountName, string name)
{
try
{
var module =
+ this.automationManagementClient.PowerShell72Module.Get(resourceGroupName, automationAccountName, name);
return new Module(resourceGroupName, automationAccountName, module);
}
catch (ErrorResponseException cloudException)
{
if (cloudException.Response.StatusCode == System.Net.HttpStatusCode.NotFound)
{
throw new ResourceNotFoundException(typeof(Module),
string.Format(CultureInfo.CurrentCulture, Resources.ModuleNotFound, name));
}
throw;
}
}
|
Hi @NoriZC
Thanks |
Description
Checklist
CONTRIBUTING.md
and reviewed the following information:generation
branch.ChangeLog.md
file(s) appropriatelyChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header in the past tense. Add changelog in description section if PR goes intogeneration
branch.ChangeLog.md
if no new release is required, such as fixing test case only.