This PR adds support for specifying Pester tags when searching for or invoking OVF tests via two new parameters (-Tag and -ExcludeTag) to Get-OperationValidation and Invoke-OperationValidation. It also addresses some PSScriptAnalyzer rule failures and some minor code cleanup.
Related Issue
Fixes #10
Motivation and Context
Since Pester includes the ability to attach tags to Describe blocks and filter test execution based on them, that ability is needed in OVF as well.
How Has This Been Tested?
Associated Pester tests have been created to validate OVF can retrieve tests based on a tag or exclude tests with a tag.
Since we're using AST to inspect the Pester test script and pull out the Describe block name and any tags, the Pester script is not actually executed when Get-OperationValidation searches for matching tests. Therefore expressions will not work when defining tags.
Description
This PR adds support for specifying Pester tags when searching for or invoking OVF tests via two new parameters (
-Tag
and-ExcludeTag
) toGet-OperationValidation
andInvoke-OperationValidation
. It also addresses some PSScriptAnalyzer rule failures and some minor code cleanup.Related Issue
Fixes #10
Motivation and Context
Since Pester includes the ability to attach tags to
Describe
blocks and filter test execution based on them, that ability is needed in OVF as well.How Has This Been Tested?
Associated Pester tests have been created to validate OVF can retrieve tests based on a tag or exclude tests with a tag.
This will work
This will NOT work
Types of changes
This change is