Skip to content

Local testing with docker

Andrii Nikitin edited this page May 28, 2020 · 1 revision

Warning:

These docker tests require --privileged flag (to start services within containers), which means that theoretically docker tests can affect host environment.

Prerequisites:

  1. To acknowledge danger of starting docker containers with --privileged flag - the test require PRIVILEGED_TESTS environment variable to be set in the environment. (See warning above).
  2. All prerequisites mentioned at: https://github.com/openSUSE/mirrorbrain/wiki/Local-testing-overview#common-prerequisites-for-running-docker-tests-and-environs-tests-in-docker

Running individual test

git clone https://github.com/coryb/osht
git clone https://github.com/openSUSE/mirrorbrain
cd mirrorbrain/t/docker
PRIVILEGED_TESTS=1 OSHT_LOCATION=$(pwd)/../../../osht/osht.sh ./01-smoke.sh

Running all tests

git clone https://github.com/coryb/osht
git clone https://github.com/openSUSE/mirrorbrain
cd mirrorbrain
PRIVILEGED_TESTS=1 OSHT_LOCATION=$(pwd)/../osht/osht.sh make test_docker

Notes:

See https://github.com/openSUSE/mirrorbrain/wiki/Local-testing-overview#common-notes-about-running-docker-tests-and-environs-tests-in-docker