Skip to content

[Feature Request]: Testing improvements proposal #1580

@itpropro

Description

@itpropro

Description

I would like to suggest some improvements to test new modules and module changes with PSRule.
This would have multiple benefits:

  1. Parameter files can be written in bicep and can be stored in a more intuitive .test folder.
  2. We can directly target .bicep test files with ps-rule.yaml files
  3. We can perform static analysis on the templates as well as on deployed resources in Azure with the in-flight analysis and can then compare the results to be the same

Questions/Tasks for testing with PSRule:

  1. Do we need a custom ruleset? For parameter sets that have full coverage, we can use the PSRule for Azure module, but for minimal parameter sets, these would throw a lot of errors like missing tags, managed identities, etc.
  2. Do we need multiple runs in the pipeline (for minimal and full parameter sets)
  3. Do we want to automatically deploy and test resources to Azure?
  4. How to migrate the existing parameter.json files to a proper testing model?

I would like to hear your thoughts on this!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions