Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test-kitchen integration tests to travis #5

Closed
esciara opened this issue Apr 5, 2014 · 11 comments · Fixed by #84
Closed

Add test-kitchen integration tests to travis #5

esciara opened this issue Apr 5, 2014 · 11 comments · Fixed by #84
Assignees

Comments

@esciara
Copy link
Contributor

esciara commented Apr 5, 2014

Hi there,

Newbie question: I saw that Travis is used, but looking at the current .travis.yml it looks like only foodcritic and rubo tests are run.

Being a newbie I have no idea what the limits to Travis are... And a wild CI dream would be that the cookbook could be tested running a test-kitchen instance, at least to see whether it installs correctly on at least on flavor of linux, even runs Integration tests with serverspec and/or ATDD tests with Cucumber. Even wilder (unreasonable?) dream would be that it does this on all supported flavors of linux when pushed to master.

Possible?

@bflad
Copy link
Contributor

bflad commented Apr 5, 2014

Definitely possible and doable from what I've seen with other cookbooks. I just haven't had time to play. Only possible limitation for test kitchen might be that I'd have to pay for test instances to spin up.

@esciara
Copy link
Contributor Author

esciara commented Apr 6, 2014

Do you have some links so I can have a look? On travis fair use policy too if you have (could not find much info on the subject).

@esciara
Copy link
Contributor Author

esciara commented Apr 11, 2014

Ok, I looked into it... I don't think it can work as installation of vagrant + VM images would pass the build timeout of 50 minutes.

So I had a look around and saw what is done on https://github.com/opscode-cookbooks/tomcat for instance. They are using test-kitchen drivers to start servers on the cloud. More details in https://github.com/opscode-cookbooks/tomcat/blob/master/TESTING.md .

Had a try on Digital Ocean with a cookbook of mine. Turns out each test on each machine costs $0.01 .

@patcon patcon changed the title Usage of Travis Add test-kitchen integration tests to travis Nov 16, 2015
@patcon
Copy link
Contributor

patcon commented Nov 16, 2015

I can work on this. I've got a good template for running test-kitchen tests via travis, using a quarantined digital ocean account specifically for testing

@patcon patcon self-assigned this Nov 16, 2015
@legal90
Copy link
Contributor

legal90 commented Nov 17, 2015

@patcon Currently I'm experimenting with Travis+Docker. I think, it will be more convenient. And it's free :)
https://github.com/legal90/confluence/tree/travis-docker
https://travis-ci.org/legal90/confluence/builds/91621505

P.s. I was inspired by Chef's "database" cookbook:
https://github.com/chef-cookbooks/database/blob/master/.travis.yml

@patcon
Copy link
Contributor

patcon commented Nov 17, 2015

Nice! fwiw I had some issues that I had to work around when I was trying to test with docker before. Seems like the others have been addressed, but I think the init_package still acts in a misleading way when you run in docker, as it will show bash or something like that instead of a init system. So might be to figure out another way to determine systemd usage

Anyhow, just a heads up. and testing costs on IaaS are essentially negligible, so no need to count that as a strike against aws or DO if we think they might be more robust :)

EDIT: possibly helpful link about init_package: sous-chefs/postgresql#247 (comment)

@patcon
Copy link
Contributor

patcon commented Nov 17, 2015

If we really want, could even create a library cookbook codifying the detection from pleaserun, or this cookbook:
lusis/chef-logstash#354

@patcon
Copy link
Contributor

patcon commented Nov 17, 2015

@legal90 mind converting that branch into a PR so we could talk about what's working and what's not so far? Wondering whether I'm hitting the same issues as you on that branch :)

@legal90
Copy link
Contributor

legal90 commented Nov 17, 2015

@patcon OK. I'll do it tomorrow

@gsreynolds
Copy link
Contributor

@patcon also worth considering poise-service as an alternative to chef-pleaserun. I've not personally used either but heard good things about poise-service.

@lock
Copy link

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants