puppetlabs / puppetlabs-pecdm

Puppet Bolt driven fusion of puppetlabs/peadm and Terraform.
Apache License 2.0
14 stars 18 forks source link

Add plan spec tests (based on pr #109) #111

Closed timidri closed 11 months ago

timidri commented 1 year ago

Since there are now so many dependencies and pdk configuration is complex, I propose to start adding some spec tests to keep confidence.

This PR is the first attempt to make everything testable by pdk test unit. The next step would be to add automatic testing in Github Actions.

Of the three spec tests, I didn't succeed in getting upgrade_spec to pass due to complexity of mocking needed and also difficulty getting sensible logging from Bolt. So that test is WIP but I still think adding the other two passing tests is a good thing since it checks the dependencies.