Commit 72a42413 by Will Daly

Fixed database to work on Jenkins (now stored in test_root),

moved syncdb/migration steps into the rake test_acceptance commands
and updated the documentation.
parent 17bd4d02
...@@ -27,8 +27,8 @@ DATA_DIR = COURSES_ROOT ...@@ -27,8 +27,8 @@ DATA_DIR = COURSES_ROOT
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.sqlite3',
'NAME': ENV_ROOT / "db" / "test_mitx.db", 'NAME': TEST_ROOT / "db" / "test_mitx.db",
'TEST_NAME': ENV_ROOT / "db" / "test_mitx.db", 'TEST_NAME': TEST_ROOT / "db" / "test_mitx.db",
} }
} }
......
...@@ -166,14 +166,6 @@ uses [Selenium](http://docs.seleniumhq.org/) to control the browser. ...@@ -166,14 +166,6 @@ uses [Selenium](http://docs.seleniumhq.org/) to control the browser.
**Prerequisite**: You must have [ChromeDriver](https://code.google.com/p/selenium/wiki/ChromeDriver) **Prerequisite**: You must have [ChromeDriver](https://code.google.com/p/selenium/wiki/ChromeDriver)
installed to run the tests in Chrome. installed to run the tests in Chrome.
Before running the tests, you need to set up the test database:
rm ../db/test_mitx.db
rake django-admin[syncdb,lms,acceptance,--noinput]
rake django-admin[migrate,lms,acceptance,--noinput]
rake django-admin[syncdb,cms,acceptance,--noinput]
rake django-admin[migrate,cms,acceptance,--noinput]
To run all the acceptance tests: To run all the acceptance tests:
rake test_acceptance_lms rake test_acceptance_lms
......
...@@ -43,8 +43,8 @@ CONTENTSTORE = { ...@@ -43,8 +43,8 @@ CONTENTSTORE = {
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.sqlite3',
'NAME': ENV_ROOT / "db" / "test_mitx.db", 'NAME': TEST_ROOT / "db" / "test_mitx.db",
'TEST_NAME': ENV_ROOT / "db" / "test_mitx.db", 'TEST_NAME': TEST_ROOT / "db" / "test_mitx.db",
} }
} }
......
...@@ -244,7 +244,8 @@ def run_tests(system, report_dir, stop_on_failure=true) ...@@ -244,7 +244,8 @@ def run_tests(system, report_dir, stop_on_failure=true)
end end
def run_acceptance_tests(system, report_dir, harvest_args) def run_acceptance_tests(system, report_dir, harvest_args)
ENV['NOSE_XUNIT_FILE'] = File.join(report_dir, 'acceptance_tests.xml') sh(django_admin(system, 'acceptance', 'syncdb', '--noinput'))
sh(django_admin(system, 'acceptance', 'migrate', '--noinput'))
sh(django_admin(system, 'acceptance', 'harvest', '--debug-mode', harvest_args)) sh(django_admin(system, 'acceptance', 'harvest', '--debug-mode', harvest_args))
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment