[chef] Re: Unit testing HWRPs


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Unit testing HWRPs
  • Date: Thu, 23 Jan 2014 16:23:26 -0800

once its hwrp, its more like standard ruby library. for examples look ate chef core code base, its have a very nice suite of tests (including the out of the box chef resources/providers, all of them are hwrp)


On Thu, Jan 23, 2014 at 3:59 PM, Benjamin Bytheway < " target="_blank"> > wrote:
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.

§