]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests: helper to run unit / function tests in docker
authorLoic Dachary <loic-201408@dachary.org>
Tue, 7 Oct 2014 16:40:54 +0000 (18:40 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 18 Nov 2014 11:20:01 +0000 (12:20 +0100)
commitecccb397698a36c13db402f0c78b3d17516211b1
tree49d0762eab2ad41236eb73706b2d343ab47cd69b
parent23aaf6c90debd4ce4c616c8a2e515594b847abe6
tests: helper to run unit / function tests in docker

For instance

   test/docker-test.sh --os-type ubuntu --os-version 14.04 \
        test/ceph-disk.sh

runs test/ceph-disk.sh in a ubuntu 14.04 docker container. Once the
container is populated and ceph compiled, running a test script roughly
requires entering the container and running make TESTS=tests/foo.sh check

* docker build ceph-ubuntu-14.04 using ubuntu.dockerfile as a Dockerfile
* it will run apt-get install ceph compilation / run dependencies
* git clone the-local-clone ceph-ubuntu-14.04
* docker run ceph-ubuntu-14.04 make -j4 in the ceph-ubuntu-14.04 clone
* docker run test/ceph-disk.sh

test/docker-test.sh is the command line interface for
test/docker-test-helper.sh which can be invoked from shell scripts.
test/ubuntu.dockerfile and test/ubuntu.dockerfile are regular
Dockerfiles which allow substitution of environment variables.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/test/centos.dockerfile [new file with mode: 0644]
src/test/docker-test-helper.sh [new file with mode: 0755]
src/test/docker-test.sh [new file with mode: 0755]
src/test/ubuntu.dockerfile [new file with mode: 0644]