I wanted to refactor something, but without tests to show that my changes didn't actually change the resulting operations (beyond a few fixes), I was unlikely to be able to convince folk to look at it.
Ideally, we will add some integration tests that can work against a running instance, but this is (hopefully) a great start for unit testing that can be run quickly at dev and build time!
Most missed testing is now in Set-CCMDeploymentStep (which is non-functional but lengthy, and has a bug open around fixing it - #68), Import-PDQDeployPackage (which I didn't have data to test against), the if not $script:session throw blocks, and argument completers.
There are a number of currently skipped tests that could do with a chat.
Testing
No changes to operational code were made, except for those that fixed bugs in functions. These should now work!
Operating Systems Testing
Windows 10
Change Types Made
...technically I suppose the changes to fix functions are breaking changes, but in a good way? I'd argue there are no truly breaking changes in here. There is a change to make a name match more exact that may break usage, but does not break what we say should happen. Happy to chat about that.
[x] Bug fix (non-breaking change).
[x] Feature / Enhancement (non-breaking change).
~[ ] Breaking change (fix or feature that could cause existing functionality to change).~
~[ ] Documentation changes.~
[x] PowerShell code changes.
Change Checklist
~[ ] Requires a change to the documentation.~
~[ ] Documentation has been updated.~
[x] Tests to cover my changes, have been added.
[x] All new and existing tests passed? (note: I removed some of the existing tests, but they all now pass!)
Description Of Changes
This PR adds a few tests to the module.
Motivation and Context
I wanted to refactor something, but without tests to show that my changes didn't actually change the resulting operations (beyond a few fixes), I was unlikely to be able to convince folk to look at it.
Ideally, we will add some integration tests that can work against a running instance, but this is (hopefully) a great start for unit testing that can be run quickly at dev and build time!
Most missed testing is now in
Set-CCMDeploymentStep
(which is non-functional but lengthy, and has a bug open around fixing it - #68),Import-PDQDeployPackage
(which I didn't have data to test against), theif not $script:session throw
blocks, and argument completers.There are a number of currently skipped tests that could do with a chat.
Testing
No changes to operational code were made, except for those that fixed bugs in functions. These should now work!
Operating Systems Testing
Change Types Made
...technically I suppose the changes to fix functions are breaking changes, but in a good way? I'd argue there are no truly breaking changes in here. There is a change to make a name match more exact that may break usage, but does not break what we say should happen. Happy to chat about that.
Change Checklist
Related Issue
Fixes #66