Assert the mysql user and database


#1

I’m writing a lwrp for a php app using the test-kitchen, berkshelf and minitest-chef-handler

Here is the example spec I’m using https://github.com/calavera/minitest-chef-handler/blob/v0.4.0/examples/spec_examples/files/default/tests/minitest/example_test.rb

But one thing I’m confused about is how to assert the mysql user is created with privileges on the particular database.
The example doesn’t have such assertion. I am using the database cookbook’s lwrp to create db user and database.

How do I test it?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.com (http://nepalonrails.tumblr.com)
http://funsole.com
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)