diff --git a/HISTORY.rst b/HISTORY.rst index 6ba282607f..59bee28690 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,7 +2,7 @@ ================== - Fix deprecation warning to prepare upgrade to Django 1.11 and 2.0. - Fix document page zoom. -- Add support to run tests against a MySQL or Postgres container. +- Add support to run tests against a MySQL, Postgres or Oracle container. - Improve tag widget customization by moving the markup to its own template. - Fix document page widget appearance in the document page list view. - Make document version order deterministic. diff --git a/Makefile b/Makefile index fbdd83d0d6..72194e3a39 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,25 @@ test-mysql-all: test-launch-mysql @docker rm -f test-mysql || true @docker volume rm test-mysql || true +test-launch-oracle: + @docker rm -f test-oracle || true + @docker volume rm test-oracle || true + docker run -d --name test-oracle -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true -v test-oracle:/u01/app/oracle wnameless/oracle-xe-11g + # https://gist.github.com/kimus/10012910 + pip install cx_Oracle + while ! nc -z 127.0.0.1 49161; do sleep 1; done + sleep 10 + +test-oracle: test-launch-oracle + ./manage.py test $(MODULE) --settings=mayan.settings.testing.docker.db_oracle --nomigrations + @docker rm -f test-oracle || true + @docker volume rm test-oracle || true + +test-oracle-all: test-launch-oracle + ./manage.py test --mayan-apps --settings=mayan.settings.testing.docker.db_oracle --nomigrations + @docker rm -f test-oracle || true + @docker volume rm test-oracle || true + # Documentation docs_serve: diff --git a/mayan/settings/testing/docker/db_oracle.py b/mayan/settings/testing/docker/db_oracle.py new file mode 100644 index 0000000000..75a462ecfe --- /dev/null +++ b/mayan/settings/testing/docker/db_oracle.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals + +from .base import * # NOQA + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.oracle', + 'NAME': 'xe', + 'USER': 'system', + 'HOST': '127.0.0.1', + 'PORT': '49161', + 'PASSWORD': 'oracle', + } +}