Merge "Revert fix pifpaf run postgresql failing"
This commit is contained in:
commit
57eb8295cf
@ -105,8 +105,10 @@ class DeckhandWithDBTestCase(DeckhandTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(DeckhandWithDBTestCase, self).setUp()
|
||||
if 'PIFPAF_URL' not in os.environ:
|
||||
raise RuntimeError('Unit tests must be run using `pifpaf run '
|
||||
'postgresql`.')
|
||||
self.override_config(
|
||||
'connection', os.environ.get('DATABASE_URL', 'sqlite://'),
|
||||
group='database')
|
||||
'connection', os.environ['PIFPAF_URL'], group='database')
|
||||
db_api.setup_db()
|
||||
self.addCleanup(db_api.drop_db)
|
||||
|
@ -16,6 +16,7 @@ testtools>=1.4.0 # MIT
|
||||
bandit>=1.1.0 # Apache-2.0
|
||||
gabbi==1.35.1
|
||||
pytest-html==1.16.0
|
||||
pifpaf==2.0.0
|
||||
|
||||
# NOTE(fmontei): The requirement below is only included because readthedocs
|
||||
# depends on it to work, since it runs pip install -rtest-requirements.txt.
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script intended for running Deckhand functional tests via gabbi. Requires
|
||||
# Docker CE (at least) to run.
|
||||
|
||||
# Meant for capturing output of Deckhand image. This requires that logging
|
||||
# in the image be set up to pipe everything out to stdout/stderr.
|
||||
STDOUT=$(mktemp)
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script for setting up temporary PostgreSQL database for testing unit tests
|
||||
# against.
|
||||
# against. Requires Docker CE (at least) to be executed. Fallback in case
|
||||
# `pifpaf` fails.
|
||||
|
||||
function cleanup {
|
||||
sudo docker stop $POSTGRES_ID
|
||||
|
4
tox.ini
4
tox.ini
@ -21,12 +21,12 @@ commands =
|
||||
[testenv:py27]
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
{toxinidir}/tools/unit-tests.sh '{posargs}'
|
||||
pifpaf run postgresql -- '{toxinidir}'/tools/pretty_tox.sh '--concurrency=1 {posargs}'
|
||||
|
||||
[testenv:py35]
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
{toxinidir}/tools/unit-tests.sh '{posargs}'
|
||||
pifpaf run postgresql -- '{toxinidir}'/tools/pretty_tox.sh '--concurrency=1 {posargs}'
|
||||
|
||||
[testenv:functional]
|
||||
usedevelop = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user