[chef] Unit testing HWRPs


Chronological Thread 
  • From: Benjamin Bytheway < >
  • To:
  • Subject: [chef] Unit testing HWRPs
  • Date: Thu, 23 Jan 2014 16:59:59 -0700

I have a cookbook that uses LWRPs to configure some weblogic domains.  The LWRP is getting really complex and deserves (I think) to be made into an HWRP with more complete unit tests, etc.

Does anyone know of best practices for unit testing HRWPs like this?

I found that the dsh cookbook (https://github.com/rcbops-cookbooks/dsh) does have a spec tested HWRP, which ends up stubbing method calls on the chef providers used to prevent them from converging on the test machine. Is this the best approach to take?

Anyone have suggestions or places to start digging?

Thanks,

Ben



Archive powered by MHonArc 2.6.16.

§