From 293d0a8645e348ff9ab0f7fa57da7067c7ff03fa Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Wed, 22 May 2013 21:58:29 -0400 Subject: [PATCH] special case the db setup for the cms acceptance tests. We need the comment client database tables to be created since we're creating the DB from scratch --- rakefiles/tests.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rakefiles/tests.rake b/rakefiles/tests.rake index ebe8ea6375..2dbde6b692 100644 --- a/rakefiles/tests.rake +++ b/rakefiles/tests.rake @@ -25,6 +25,16 @@ def run_tests(system, report_dir, stop_on_failure=true) end def run_acceptance_tests(system, report_dir, harvest_args) + # HACK: Since now the CMS depends on the existence of some database tables + # that used to be in LMS (Role/Permissions for Forums) we need to make + # sure the acceptance tests create/migrate the database tables + # that are represented in the LMS. We might be able to address this by moving + # out the migrations from lms/django_comment_client, but then we'd have to + # repair all the existing migrations from the upgrade tables in the DB. + if system == :cms + sh(django_admin('lms', 'acceptance', 'syncdb', '--noinput')) + sh(django_admin('lms', 'acceptance', 'migrate', '--noinput')) + end sh(django_admin(system, 'acceptance', 'syncdb', '--noinput')) sh(django_admin(system, 'acceptance', 'migrate', '--noinput')) sh(django_admin(system, 'acceptance', 'harvest', '--debug-mode', '--tag -skip', harvest_args))