diff --git a/scripts/UpdateRequiredModules.ps1 b/scripts/UpdateRequiredModules.ps1 index 143ae5fc..ca2525bd 100644 --- a/scripts/UpdateRequiredModules.ps1 +++ b/scripts/UpdateRequiredModules.ps1 @@ -4,11 +4,9 @@ $existingmodule = @() $newmodule = @() $updated = $false $data.RequiredModules | ForEach-Object { - $moduleVersion = $_.RequiredVersion - [int]$moduleVersionInt = $moduleVersion.Replace('.',',') - $galleryVersion = (Find-Module -Name $_.ModuleName).Version - [int]$galleryVersionInt = $galleryVersion.Replace('.',',') - if ($moduleVersionInt -lt $galleryVersionInt) { + $moduleVersion = New-Object System.Version($_.RequiredVersion) + $galleryVersion = New-Object System.Version((Find-Module -Name $_.ModuleName).Version) + if ($moduleVersion -lt $galleryVersion) { $newmodule = @{ "ModuleName" = $_.ModuleName "RequiredVersion" = $galleryVersion diff --git a/src/internal/functions/Assert-AzOpsJqDependency.ps1 b/src/internal/functions/Assert-AzOpsJqDependency.ps1 index 643ba7cc..e85e4de6 100644 --- a/src/internal/functions/Assert-AzOpsJqDependency.ps1 +++ b/src/internal/functions/Assert-AzOpsJqDependency.ps1 @@ -19,13 +19,13 @@ process { Write-AzOpsMessage -LogLevel InternalComment -LogString 'Assert-AzOpsJqDependency.Validating' - + $minVersion = New-Object System.Version("1.6") $result = (Invoke-AzOpsNativeCommand -ScriptBlock { jq --version } -IgnoreExitcode) $installed = $result -as [bool] if ($installed) { - [double]$version = ($result).Split("-")[1] - if ($version -ge 1.6) { + $version = New-Object System.Version(($result).Split("-")[1]) + if ($version -ge $minVersion) { Write-AzOpsMessage -LogLevel InternalComment -LogString 'Assert-AzOpsJqDependency.Success' return } diff --git a/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json b/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json index 4e7d3310..60868f03 100644 --- a/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json +++ b/src/tests/functional/Microsoft.Network/connections/deploy/deploy.json @@ -40,13 +40,13 @@ "name": "[parameters('publicIPAddressesName')]", "location": "northeurope", "sku": { - "name": "Basic", + "name": "Standard", "tier": "Regional" }, "properties": { "ipAddress": "20.219.217.108", "publicIPAddressVersion": "IPv4", - "publicIPAllocationMethod": "Dynamic", + "publicIPAllocationMethod": "Static", "idleTimeoutInMinutes": 4, "dnsSettings": { "domainNameLabel": "[parameters('publicIPAddressesName')]",