X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=blobdiff_plain;f=docker%2Ftests.yml;fp=docker%2Ftests.yml;h=a33f0d43144673757d6190ca9e68d6d8b2e0a0cf;hp=0000000000000000000000000000000000000000;hb=51cc9c4c78bb54c84a5d2399207d206eb30ea247;hpb=9f40121f66e644ddf700720d8d4bdf464f6dd414 diff --git a/docker/tests.yml b/docker/tests.yml new file mode 100644 index 00000000..a33f0d43 --- /dev/null +++ b/docker/tests.yml @@ -0,0 +1,37 @@ +# This file is intended to be used by the developer in the local machine +# in order to run the tests in isolation +# To do so, cd into osm_ro and run: +# docker-compose -f ../docker/tests.yml run --rm tox -c +version: '2' +services: + test-db: + image: mysql:5 + container_name: test-db + restart: always + environment: + - MYSQL_ROOT_PASSWORD=osm4u + - MYSQL_USER=mano + - MYSQL_PASSWORD=manopw + - MYSQL_DATABASE=mano_db + tox: + container_name: tox + depends_on: + - test-db + build: + context: ../ + dockerfile: docker/tests.dockerfile + restart: always + environment: + - RO_DB_ROOT_PASSWORD=osm4u + - TEST_DB_HOST=test-db + - TEST_DB_USER=mano + - TEST_DB_PASSWORD=manopw + - TEST_DB_DATABASE=mano_db + ports: + - "9090:9090" + volumes: + - ..:/opt/openmano + - /tmp/osm/openmano/logs:/var/log/osm + entrypoint: + - tox + working_dir: /opt/openmano/osm_ro