Skip to content

Conversation

@minhsuanlee
Copy link
Contributor

@minhsuanlee minhsuanlee commented Oct 27, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@minhsuanlee
Copy link
Contributor Author

@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.

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@minhsuanlee minhsuanlee marked this pull request as ready for review October 31, 2025 18:56
$hasApplianceName = $PSBoundParameters.ContainsKey("ApplianceName")

$discoverySolutionName = "Servers-Discovery-ServerDiscovery"
$discoverySolution = Az.Migrate.private\Get-AzMigrateSolution_Get -SubscriptionId $SubscriptionId -ResourceGroupName $ResourceGroupName -MigrateProjectName $ProjectName -Name $discoverySolutionName
Copy link
Contributor

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 {
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants