Skip to content

Latest commit

 

History

History
88 lines (63 loc) · 2.05 KB

Get-AvmBicepWorkflowTestFiles.md

File metadata and controls

88 lines (63 loc) · 2.05 KB

Get-AvmBicepWorkflowTestFiles

Synopsis

Discover native Bicep test files and policy candidates for one module.

Description

Resolves an exact repository-relative Bicep module path, discovers its main.test.bicep files, and returns compact JSON arrays for workflow matrices. Each test record includes its module-relative path, display name, and .e2eignore state. The policy array contains the tests whose paths match PsRuleFilterRegex.

Syntax

Get-AvmBicepWorkflowTestFiles [-Root] <string> [-ModulePath] <string> [[-PsRuleFilterRegex] <string>] [-SkipModuleVersionCheck] [<CommonParameters>]

Parameters

-ModulePath

Exact repository-relative module path using forward slashes.

Property Value
Type String
Required true
Position 2
Default value
Accept pipeline input false
Accept wildcard characters false

-PsRuleFilterRegex

Regular expression that selects policy test files. It defaults to defaults and waf-aligned test paths.

Property Value
Type String
Required false
Position 3
Default value (defaults|waf-aligned)
Accept pipeline input false
Accept wildcard characters false

-Root

Existing filesystem repository root that contains the module.

Property Value
Type String
Required true
Position 1
Default value
Accept pipeline input false
Accept wildcard characters false

-SkipModuleVersionCheck

Skip the PowerShell Gallery version check for source or offline callers.

Property Value
Type Switch
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false

Examples

EXAMPLE 1

Get-AvmBicepWorkflowTestFiles -Root $repo -ModulePath 'avm/res/storage/storage-account'

Outputs

  • PSCustomObject with TestFiles and PolicyTestFiles arrays.