fgrehm / chef-dokku

Chef cookbook for Dokku
MIT License
50 stars 19 forks source link

Switch to test-kitchen #14

Open wingrunr21 opened 10 years ago

wingrunr21 commented 10 years ago

Instead of relying on a Vagrantfile for chef-solo testing, I'd like to switch us over to test-kitchen. This combined with serverspec tests should help keep us from regressing along with maintaining behavior with the base dokku project.

It'll also help me since I use parallels instead of VirtualBox :smile:

fgrehm commented 10 years ago

:thumbsup:

mikexstudios commented 10 years ago

I've been working on updating chef-dokku to match dokku v0.2.3 and added test-kitchen tests along the way. I'm not sure if this is the way you envision the tests so I'll post links instead of a pull request:

https://github.com/mikexstudios/chef-dokku/blob/v0.2.3/.kitchen.yml https://github.com/mikexstudios/chef-dokku/blob/v0.2.3/attributes/test_helper.rb https://github.com/mikexstudios/chef-dokku/blob/v0.2.3/recipes/test_helper.rb https://github.com/mikexstudios/chef-dokku/blob/v0.2.3/test/integration/default/bats/deploy_apps.bats

Right now, I only implemented the same deploy tests as dokku. Here's how it works:

I wanted to use serverspec, but given the command-heavy nature of deploying the test apps, I opted for bats instead. One neat aspect is that I'm using xip.io for wildcard subdomains that point to a private network address. This simplifies testing app deployment and eliminates the need for something like https://github.com/phinze/landrush, which did not run very well on my system.

I will try to add some other tests for local dokku commands later. But does this sound reasonable so far?

wingrunr21 commented 10 years ago

This looks fine to me so far. I have no issue with using bats over serverspec.

wingrunr21 commented 10 years ago

@mikexstudios I am going to do work on this today. I may cherry-pick some of your commits out of your branch if you don't mind. Hoping to get a lot of stuff done as I have been neglecting this cookbook.

mikexstudios commented 10 years ago

Great thanks. I'm busy today, but let me know if there is anything I can help with. On Jun 26, 2014 10:55 AM, "Stafford Brunk" notifications@github.com wrote:

@mikexstudios https://github.com/mikexstudios I am going to do work on this today. I may cherry-pick some of your commits out of your branch if you don't mind. Hoping to get a lot of stuff done as I have been neglecting this cookbook.

— Reply to this email directly or view it on GitHub https://github.com/fgrehm/chef-dokku/issues/14#issuecomment-47236047.