PSRule.Rules.Azure icon indicating copy to clipboard operation
PSRule.Rules.Azure copied to clipboard

Improve test coverage of powershell functions

Open ArmaanMcleod opened this issue 4 years ago • 2 comments

More test coverage with the below files:

  • https://github.com/Azure/PSRule.Rules.Azure/blob/main/src/PSRule.Rules.Azure/PSRule.Rules.Azure.psm1
  • https://github.com/Azure/PSRule.Rules.Azure/blob/main/src/PSRule.Rules.Azure/rules/Azure.Common.Rule.ps1

Would be very beneficial to add more Pester tests to cover more of these functions and avoid regression in the future.

Quite a bit of work but can split multiple PRs to cover off sections and link to this issue.

ArmaanMcleod avatar Sep 10 '21 14:09 ArmaanMcleod

@ArmaanMcleod Seems like a good idea to me.

BernieWhite avatar Sep 10 '21 14:09 BernieWhite

An additional thought, for anyone picking this up would be to double check that functions in Azure.Common.Rule.ps1 are referenced somewhere before writing a test. It's possible there is some unreferenced code. If found let's remove it.

BernieWhite avatar Sep 10 '21 14:09 BernieWhite