docker-odoo-image
docker-odoo-image copied to clipboard
Make tests for each docker build in this repo
Based on #112, each image should be tested for a common set of tasks:
- Is every software listed on the definition available and behaving correctly?
- Can we make basic operations on the OS? (Install/uninstall software, restart services, uncompress archives, etc).
- Is the performance OK?
I've been implementing this feature on my docker images using rspec
and serverspec
(ruby) because its dead simple.
Here you have some resources to start:
- https://robots.thoughtbot.com/tdd-your-dockerfiles-with-rspec-and-serverspec
- http://www.unixdaemon.net/tools/testing-dockerfiles-with-serverspec/
Thank you I'll review it the next week
I've implemented this on my own images, you can check out my test script for a debian image here: https://github.com/LuisAlejandro/dockershelf/blob/develop/debian/test-image.rb
And how to run it here: https://github.com/LuisAlejandro/dockershelf/blob/develop/test-image.sh#L43
And here: https://github.com/LuisAlejandro/dockershelf/blob/develop/.travis.yml#L53
I've also made a test script for python images, but it's not complete yet: https://github.com/LuisAlejandro/dockershelf/blob/develop/python/test-image.rb
Greetings!