Open wingrunr21 opened 10 years ago
:thumbsup:
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:
.kitchen.yml
, I set it to only test the python-flask app so that tests do not take a long time to run.recipe[dokku::test_helper]
in the run list. The test_helper.rb
recipe sets up the test apps from the original dokku git repository and enables root to push to dokku.deploy_apps.bats
is run during kitchen verify
and pushes each of the enabled apps to the dokku server and checks its output (using the check_output
script included with each app).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?
This looks fine to me so far. I have no issue with using bats
over serverspec
.
@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.
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.
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: