Skip to content

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

@ChrisGibson1982

Description

@ChrisGibson1982

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions