Azure / Azure/ResourceModules

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

Open
#3,999 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
737
Forks
436
Avg merge
10d 7h
Merged PRs (30d)
1

Description

### 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

```Shell
##[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 , /home/vsts/work/1/s/utilities/pipelines/staticValidation/module.tests.ps1:668
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.