docker-odoo-image icon indicating copy to clipboard operation
docker-odoo-image copied to clipboard

Make tests for each docker build in this repo

Open LuisAlejandro opened this issue 8 years ago • 3 comments

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?

LuisAlejandro avatar Apr 28 '16 21:04 LuisAlejandro

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/

LuisAlejandro avatar Dec 22 '16 02:12 LuisAlejandro

Thank you I'll review it the next week

moylop260 avatar Dec 22 '16 05:12 moylop260

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!

LuisAlejandro avatar Jan 02 '17 20:01 LuisAlejandro