diff --git a/.github/workflows/module-tests.yml b/.github/workflows/module-tests.yml index f64ce3a4..d0ed6306 100644 --- a/.github/workflows/module-tests.yml +++ b/.github/workflows/module-tests.yml @@ -125,6 +125,12 @@ jobs: Remove-AzResourceGroup -Name $rsgNetworkWatcherName -Force Remove-AzResourceGroup -Name $rsgDeploymentScriptName -Force + Write-Host "Cleanup registered providers and features..." -ForegroundColor Yellow + Unregister-AzResourceProvider -ProviderNamespace "Microsoft.HybridCompute" + Unregister-AzResourceProvider -ProviderNamespace "Microsoft.AVS" + Unregister-AzProviderFeature -FeatureName "ArcServerPrivateLinkPreview" -ProviderNamespace "Microsoft.HybridCompute" + Unregister-AzProviderFeature -FeatureName "AzureServicesVm" -ProviderNamespace "Microsoft.AVS" + Write-Host "Cleanup Hub Subscription Resources..." -ForegroundColor Yellow Select-AzSubscription -SubscriptionId "${{ env.SUB_HUB_ID }}" diff --git a/tests/lz-vending/full.test.bicep b/tests/lz-vending/full.test.bicep index eb000e13..5e857f5a 100644 --- a/tests/lz-vending/full.test.bicep +++ b/tests/lz-vending/full.test.bicep @@ -91,7 +91,7 @@ module vwanSpoke '../../main.bicep' = { virtualNetworkPeeringEnabled: true hubNetworkResourceId: '/subscriptions/e4e7395f-dc45-411e-b425-95f75e470e16/resourceGroups/rsg-blzv-perm-hubs-001/providers/Microsoft.Network/virtualHubs/vhub-uksouth-blzv' resourceProviders :{ - 'Microsoft.Compute' : ['InGuestHotPatchVMPreview'] + 'Microsoft.HybridCompute' : ['ArcServerPrivateLinkPreview'] 'Microsoft.AVS' : ['AzureServicesVm'] } } diff --git a/tests/pester/full.tests.ps1 b/tests/pester/full.tests.ps1 index bd25c474..49cf16fc 100644 --- a/tests/pester/full.tests.ps1 +++ b/tests/pester/full.tests.ps1 @@ -47,8 +47,8 @@ Describe "Bicep Landing Zone (Sub) Vending Tests" { } It "Should have the 'Microsoft.Compute', 'Microsoft.AVS' resource providers and the 'AzureServicesVm', 'InGuestHotPatchVMPreview' resource providers features registered" { - $resourceProviders = @( "Microsoft.Compute", "Microsoft.AVS" ) - $resourceProvidersFeatures = @( "AzureServicesVm", "InGuestHotPatchVMPreview" ) + $resourceProviders = @( "Microsoft.HybridCompute", "Microsoft.AVS" ) + $resourceProvidersFeatures = @( "AzureServicesVm", "ArcServerPrivateLinkPreview" ) ForEach ($provider in $resourceProviders) { $providerStatus = (Get-AzResourceProvider -ListAvailable | Where-Object ProviderNamespace -eq $provider).registrationState $providerStatus | Should -BeIn @('Registered', 'Registering')