Skip to content

Commit

Permalink
Fixes bug 985106 - add upgrade/downgrade for alembic to every make
Browse files Browse the repository at this point in the history
  • Loading branch information
selenamarie committed Mar 18, 2014
1 parent 5b62bb1 commit 98cbbdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -33,6 +33,9 @@ test-socorro: bootstrap
PYTHONPATH=$(PYTHONPATH) $(SETUPDB) --database_name=socorro_integration_test --database_username=$(database_username) --database_hostname=$(database_hostname) --database_password=$(database_password) --database_port=$(DB_PORT) --database_superusername=$(database_superusername) --database_superuserpassword=$(database_superuserpassword) --dropdb --logging.stderr_error_logging_level=40 --unlogged
PYTHONPATH=$(PYTHONPATH) $(SETUPDB) --database_name=socorro_test --database_username=$(database_username) --database_hostname=$(database_hostname) --database_password=$(database_password) --database_port=$(DB_PORT) --database_superusername=$(database_superusername) --database_superuserpassword=$(database_superuserpassword) --dropdb --no_schema --logging.stderr_error_logging_level=40 --unlogged
cd socorro/unittest/config; for file in *.py.dist; do if [ ! -f `basename $$file .dist` ]; then cp $$file `basename $$file .dist`; fi; done
PYTHONPATH=$(PYTHONPATH) $(SETUPDB) --database_name=socorro_migration_test --database_username=$(database_username) --database_hostname=$(database_hostname) --database_password=$(database_password) --database_port=$(DB_PORT) --database_superusername=$(database_superusername) --database_superuserpassword=$(database_superuserpassword) --dropdb --logging.stderr_error_logging_level=40 --unlogged
PYTHONPATH=$(PYTHONPATH) $(VIRTUALENV)/bin/alembic -c config/alembic.ini downgrade -1
PYTHONPATH=$(PYTHONPATH) $(VIRTUALENV)/bin/alembic -c config/alembic.ini upgrade +1
# run tests with coverage
rm -f coverage.xml
$(ENV) $(PG_RESOURCES) $(RMQ_RESOURCES) $(ES_RESOURCES) PYTHONPATH=$(PYTHONPATH) $(COVERAGE) run $(NOSE)
Expand Down
2 changes: 1 addition & 1 deletion config/alembic.ini-dist
Expand Up @@ -11,7 +11,7 @@ file_template = %%(rev)s_%%(slug)s
# the 'revision' command, regardless of autogenerate
# revision_environment = false

sqlalchemy.url = postgresql://postgres@localhost/breakpad
sqlalchemy.url = postgresql://test:aPassword@jenkins-pg92/breakpad

# Logging configuration
[loggers]
Expand Down

0 comments on commit 98cbbdf

Please sign in to comment.