-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Stabilize for AzureMigrateLocal commands and their tests #28755
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
base: bernard-migrate-migrate-to-autorest-v4
Are you sure you want to change the base?
Stabilize for AzureMigrateLocal commands and their tests #28755
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
@isra-fel could you please provide some assistance regarding the Connect-AzAccount or missing AzContext during tests? I've also made a post at PowerShell Team's channel. Thank you. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| $hasApplianceName = $PSBoundParameters.ContainsKey("ApplianceName") | ||
|
|
||
| $discoverySolutionName = "Servers-Discovery-ServerDiscovery" | ||
| $discoverySolution = Az.Migrate.private\Get-AzMigrateSolution_Get -SubscriptionId $SubscriptionId -ResourceGroupName $ResourceGroupName -MigrateProjectName $ProjectName -Name $discoverySolutionName |
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.
Please do not call cmd directly like Get-AzMigrateSolution, which may forbid recording test.
If it's hidden cmd, please use internal method like Az.Migrate.Internal\Get-AzMigrateLocalReplicationJob.
Otherwise, please use private method like Az.Migrate.private\Get-AzMigrateSolution_Get to directly call the variant.
| } | ||
|
|
||
| It 'ListInSite' { | ||
| It 'ListInSite' -Skip { |
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.
May I know why so many cases are skipped?
When migrating, I have unskipped test cases from only Get-AzMigrateDiscoveredServer.Tests.ps1 and New-AzMigrateProject.Tests.ps1, 5 test cases only, all the other skipped test cases should be able to be recorded.
Besides, the tests are seems not recorded, as none of the recording file changed.
You could check the instructions for recording tests by documentation I sent you through email.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.