[Az.Aks] Bump api version to 2025-08-01#28786
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
| $MaintenanceConfigName = 'aksManagedAutoUpgradeSchedule' | ||
| $MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -ConfigName $MaintenanceConfigName -WeeklyDayOfWeek Friday -WeeklyIntervalWeek 2 -MaintenanceWindowStartTime 01:00 -MaintenanceWindowDurationHour 6 |
There was a problem hiding this comment.
The maintenance configuration name 'aksManagedAutoUpgradeSchedule' appears to be a specific reserved name for auto-upgrade schedules in AKS. Verify that this is an appropriate name for a general maintenance configuration test, or consider using a more generic test-specific name. If this is indeed a reserved configuration name, add a comment explaining its significance.
| $result = Start-AzAksManagedClusterCommand -InputObject $aks -Command "kubectl get nodes" | ||
| $result.ProvisioningState | Should -Be 'Succeeded' | ||
| $result.ExitCode | Should -Be 0 | ||
| $result.Log.contains("aks-default") | Should -Be $true |
There was a problem hiding this comment.
Use the PowerShell -contains operator instead of the string method .contains() for consistency with PowerShell conventions. The correct usage should be $result.Log -like '*aks-default*' or use the -match operator with regex.
| $result.Log.contains("aks-default") | Should -Be $true | |
| $result.Log -like '*aks-default*' | Should -Be $true |
| It 'Stop' -skip { | ||
| { throw [System.NotImplementedException] } | Should -Not -Throw |
There was a problem hiding this comment.
The test is skipped with a NotImplementedException placeholder. Either implement the test or remove the -skip flag and provide a meaningful test implementation. Skipped tests without justification reduce test coverage.
| Stop-AzAksCluster -ResourceGroupName $env.ResourceGroupName -Name $env.AksName | ||
| Start-AzAksCluster -ResourceGroupName $env.ResourceGroupName -Name $env.AksName |
There was a problem hiding this comment.
The test calls Stop-AzAksCluster before testing Start-AzAksCluster, which creates a dependency on the Stop functionality. Consider using a setup/teardown approach or mocking to ensure the cluster is in the expected state, making the test more reliable and independent.
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.