ResourceModules icon indicating copy to clipboard operation
ResourceModules copied to clipboard

[Bug Report]: Module network\virtual-network fails on static tests

Open ChrisGibson1982 opened this issue 3 years ago • 0 comments

Describe the bug

Running the "Network - Virtual-Networks" pipeline fails on the Static validation stage, specifically on the Pester test task.

Error message:

RuntimeException: Failed to process file [/home/vsts/work/1/s/modules/network/virtual-network/.test/common/main.test.bicep]. Please check if it properly formatted. Original error message: [Conversion from JSON failed with error: Unexpected character encountered while parsing value: a. Path 'addressPrefixes', line 5, position 6.]

Stack Trace: at ConvertTo-FormattedJSONParameterObject, /home/vsts/work/1/s/utilities/tools/Set-ModuleReadMe.ps1:759 at Set-DeploymentExamplesSection, /home/vsts/work/1/s/utilities/tools/Set-ModuleReadMe.ps1:1033 at Set-ModuleReadMe, /home/vsts/work/1/s/utilities/tools/Set-ModuleReadMe.ps1:1656 at , /home/vsts/work/1/s/utilities/pipelines/staticValidation/module.tests.ps1:668

To reproduce

Run the Virtual-Networks pipeline

Code snippet

No response

Relevant log output

##[error]    [-] [network/virtual-network] Set-ModuleReadMe script should not apply any updates. 9.34s (9.34s|1ms)
##[error]     RuntimeException: Failed to process file [/home/vsts/work/1/s/modules/network/virtual-network/.test/common/main.test.bicep]. Please check if it properly formatted. Original error message: [Conversion from JSON failed with error: Unexpected character encountered while parsing value: a. Path 'addressPrefixes', line 5, position 6.]
##[error]     at ConvertTo-FormattedJSONParameterObject, /home/vsts/work/1/s/utilities/tools/Set-ModuleReadMe.ps1:759
##[error]     at Set-DeploymentExamplesSection, /home/vsts/work/1/s/utilities/tools/Set-ModuleReadMe.ps1:1033
##[error]     at Set-ModuleReadMe, /home/vsts/work/1/s/utilities/tools/Set-ModuleReadMe.ps1:1656
##[error]     at <ScriptBlock>, /home/vsts/work/1/s/utilities/pipelines/staticValidation/module.tests.ps1:668

ChrisGibson1982 avatar Sep 22 '23 11:09 ChrisGibson1982