Improved test runtime from 352 seconds to 59 seconds by implementing an in-memory sqlite DB and including an option to run migrations on this newly created database by adding a config option called run_migrations to the config_spec and passing it along in app.py to the setup_database function.
This commit is contained in:
@@ -3,8 +3,9 @@ direct_remote_path = /test_static/
|
||||
email_sender_address = "notice@mediagoblin.example.org"
|
||||
email_debug_mode = true
|
||||
|
||||
# TODO: Switch to using an in-memory database
|
||||
sql_engine = "sqlite:///%(here)s/user_dev/mediagoblin.db"
|
||||
#Runs with an in-memory sqlite db for speed.
|
||||
sql_engine = "sqlite://"
|
||||
run_migrations = true
|
||||
|
||||
# Celery shouldn't be set up by the application as it's setup via
|
||||
# mediagoblin.init.celery.from_celery
|
||||
|
||||
@@ -3,8 +3,9 @@ direct_remote_path = /test_static/
|
||||
email_sender_address = "notice@mediagoblin.example.org"
|
||||
email_debug_mode = true
|
||||
|
||||
# TODO: Switch to using an in-memory database
|
||||
sql_engine = "sqlite:///%(here)s/user_dev/mediagoblin.db"
|
||||
#Runs with an in-memory sqlite db for speed.
|
||||
sql_engine = "sqlite://"
|
||||
run_migrations = true
|
||||
|
||||
# Celery shouldn't be set up by the application as it's setup via
|
||||
# mediagoblin.init.celery.from_celery
|
||||
|
||||
@@ -3,8 +3,9 @@ direct_remote_path = /test_static/
|
||||
email_sender_address = "notice@mediagoblin.example.org"
|
||||
email_debug_mode = true
|
||||
|
||||
# TODO: Switch to using an in-memory database
|
||||
sql_engine = "sqlite:///%(here)s/user_dev/mediagoblin.db"
|
||||
#Runs with an in-memory sqlite db for speed.
|
||||
sql_engine = "sqlite://"
|
||||
run_migrations = true
|
||||
|
||||
# tag parsing
|
||||
tags_max_length = 50
|
||||
|
||||
Reference in New Issue
Block a user