[chef] Serverspec vs Mintest Feedback


Chronological Thread 
  • From: David Petzel < >
  • To:
  • Subject: [chef] Serverspec vs Mintest Feedback
  • Date: Sat, 3 Jan 2015 15:00:37 -0500

TLDR - I'm interesting in knowing why folks are moving away from Minitest, toward ServerSpec.

I've been noticing a lot of cookbooks recently have been migrating their testings from minitest to ServerSpec. I've got nothing against ServerSpec, but I'm curious why/where this trend is coming from.

One of the things I have always liked about minitest handler is that the tests "follow" the cookbook. As an example we run the handler in our dev and qa environments which we converge hourly, so as a by product we are testing the integration of that cookbook in more places than just a developers local workstation, and we are doing it on an hourly basis. As I understand this is might be possible with ServerSpec, however its not as simple, and comes with the lose of the node object data?

Maybe my question would be better asked in the context of an example... Lets assume I am consuming a community cookbook which sets up some application that has an HTTP port. There is an attribute that controls what that HTTP port is.
In ServerSpec land, I think you need to hard code the HTTP port to test?
In Minitest, I have access to the node object, so my test is not hard coded to a port, but instead uses the value of the node attribute.

For the sake of the discussion, lets say I run that application on port 78 in dev, 79 in qa, and 80 in production. While using minitests I'm able to assert the application is working properly, because the minitest test would be reading the node attribute. However from what I've seen with ServerSpec, I don't have that same ability to adapt the test to use the right port, without manual intervention?

Have I totally missed the boat here on ServerSpec capabilities?

Thanks for any feedback/experience/war stories.





Archive powered by MHonArc 2.6.16.

§