Test de pgvirtualenv sur passerelle #116

Closed
bdauvergne wants to merge 1 commits from wip/74787-test-pgvirtualenv into main
2 changed files with 6 additions and 4 deletions

2
Jenkinsfile vendored
View File

@ -9,7 +9,7 @@ pipeline {
stages { stages {
stage('Unit Tests') { stage('Unit Tests') {
steps { steps {
sh 'NUMPROCESSES=6 tox -rv ' sh 'NUMPROCESSES=6 pg_virtualenv -p ${WORKSPACE}/.pg-${BUILD_NUMBER}.sock -o fsync=off tox -rv '
} }
post { post {
always { always {

View File

@ -64,12 +64,14 @@ CACHES = {
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'TEST': {
'NAME': ('passerelle-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-'))[:58],
},
} }
} }
# retrieve postgres params from environment
for key in ('PGPORT', 'PGHOST', 'PGUSER', 'PGPASSWORD'):
if key in os.environ:
DATABASES['default'][key[2:]] = os.environ[key]
LOGGED_REQUESTS_MAX_SIZE = 4999 LOGGED_REQUESTS_MAX_SIZE = 4999
LEGACY_URLS_MAPPING = {'old.org': 'new.org'} LEGACY_URLS_MAPPING = {'old.org': 'new.org'}