Add test-kitchen #74

Merged
merged 1 commit into from Jul 28, 2016

Projects

None yet

3 participants

@gravitystorm
Contributor

This initial configuration uses kitchen-vagrant to test the tools cookbook.

I tried, and failed^Whaven't yet succeeded in getting more complex cookbooks to run, so I fell back on a pretty simple cookbook. Even then, there were challenges getting it to work with kitchen-docker, so I stuck with kitchen-vagrant for now.

The choice of a global test-kitchen setup vs a per-cookbook setup is not my first preference. Unfortunately there's no straightforward way to implement anything else, given our mono-repo and not using any cookbook publication systems. Using a global test-kitchen config is also the result that @zerebubuth came up with independently during work in June.

@gravitystorm gravitystorm Add test-kitchen
This initial configuration uses kitchen-vagrant to test the tools cookbook.
0901083
@gravitystorm
Contributor

Oh, I should note that the "testing" of the tools cookbook only goes as far as the recipe converging successfully, it doesn't yet have any serverspec-based verification.

@gravitystorm gravitystorm referenced this pull request Jul 28, 2016
Open

Cookbook testing #13

@tomhughes
Member

Hmm, so this seems to want to use virtualbox which is something that is not getting anywhere near my machine... Not sure if it is explicitly requesting that somehow or not, as I thought I had vagrant using libvirt...

@tomhughes
Member

Ah you need to set VAGRANT_DEFAULT_PROVIDER=libvirt but then you find that the bento/ubuntu-16.04 box doesn't support the libvirt provider!

@gravitystorm
Contributor

It's possible to override configuration using a .kitchen.local.yml file, if that's useful.

https://jjasghar.github.io/blog/2014/02/17/dot-kitchen-dot-local-dot-yml-and-when-you-want-to-use-it/

That should allow setting the driver provider, and will hopefully allow you to choose a different image.

@tomhughes
Member

Yes I've managed to get it working now with the peru/ubuntu-16.04-server-amd64 box.

It's pretty slow mind - abut 3 minutes to run that one test on my machine.

@tomhughes
Member

Just for the record this .kitchen.local.yml worked for me:

---
driver:
  provider: libvirt

platforms:
  - name: ubuntu-16.04
    driver:
      box: peru/ubuntu-16.04-server-amd64
@openstreetmap-mirror openstreetmap-mirror merged commit 0901083 into openstreetmap:master Jul 28, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@gravitystorm gravitystorm deleted the gravitystorm:test-kitchen-2 branch Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment