Add support to test agains Oracle via Docker.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-22 04:40:53 -04:00
parent 906e2e36a6
commit 22bb93ec13
3 changed files with 34 additions and 1 deletions

View File

@@ -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.

View File

@@ -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:

View File

@@ -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',
}
}