From cc3851244f40e268e92a696bb8715cc568c82e71 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sun, 17 Jul 2022 21:14:44 +0200 Subject: [PATCH] Removed temporal no-restore flag following the CLI fix --- utilities/pipelines/staticValidation/module.tests.ps1 | 8 ++++---- utilities/tools/Set-ModuleReadMe.ps1 | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utilities/pipelines/staticValidation/module.tests.ps1 b/utilities/pipelines/staticValidation/module.tests.ps1 index 11041bb7d0..78aac13921 100644 --- a/utilities/pipelines/staticValidation/module.tests.ps1 +++ b/utilities/pipelines/staticValidation/module.tests.ps1 @@ -171,7 +171,7 @@ Describe 'Readme tests' -Tag Readme { if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable + $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable if (-not $templateContent) { throw ($bicepTemplateCompilationFailedException -f $templateFilePath) @@ -486,7 +486,7 @@ Describe 'Deployment template tests' -Tag Template { if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable + $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable if (-not $templateContent) { throw ($bicepTemplateCompilationFailedException -f $templateFilePath) @@ -525,7 +525,7 @@ Describe 'Deployment template tests' -Tag Template { if ((Split-Path $moduleTestFilePath -Extension) -eq '.json') { $deploymentTestFile_AllParameterNames = ((Get-Content $moduleTestFilePath) | ConvertFrom-Json -AsHashtable).parameters.Keys | Sort-Object } else { - $deploymentFileContent = az bicep build --file $moduleTestFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable + $deploymentFileContent = az bicep build --file $moduleTestFilePath --stdout | ConvertFrom-Json -AsHashtable $deploymentTestFile_AllParameterNames = $deploymentFileContent.resources[-1].properties.parameters.keys | Sort-Object # The last resource should be the test } $testFileTestCases += @{ @@ -986,7 +986,7 @@ Describe "API version tests [All apiVersions in the template should be 'recent'] if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable + $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable if (-not $templateContent) { throw ($bicepTemplateCompilationFailedException -f $templateFilePath) diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index cefb10a64a..818a4ede22 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -765,7 +765,7 @@ function Set-ModuleReadMe { if (-not $TemplateFileContent) { if ((Split-Path -Path $TemplateFilePath -Extension) -eq '.bicep') { - $templateFileContent = az bicep build --file $TemplateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable + $templateFileContent = az bicep build --file $TemplateFilePath --stdout | ConvertFrom-Json -AsHashtable } else { $templateFileContent = ConvertFrom-Json (Get-Content $TemplateFilePath -Encoding 'utf8' -Raw) -ErrorAction Stop -AsHashtable }