Skip to content
Snippets Groups Projects
Commit 1590c062 authored by David Douard's avatar David Douard
Browse files

cypress: use swh.web.settings.cypress as default DJANGO_SETTINGS_MODULE value

This is now what's expected by swh-web.
parent bf0022ad
No related branches found
No related tags found
No related merge requests found
Pipeline #12654 passed
...@@ -15,10 +15,10 @@ stage('Cypress tests') { ...@@ -15,10 +15,10 @@ stage('Cypress tests') {
rm -f swh-web-test*.sqlite3* rm -f swh-web-test*.sqlite3*
# apply django migrations and create users (will produce swh-web-test.sqlite3 file) # apply django migrations and create users (will produce swh-web-test.sqlite3 file)
python{{cypress_python_version}} swh/web/manage.py migrate --settings=${DJANGO_SETTINGS_MODULE:-swh.web.settings.tests} python{{cypress_python_version}} swh/web/manage.py migrate --settings=${DJANGO_SETTINGS_MODULE:-swh.web.settings.cypress}
for create_users_script in swh/web/tests/create_test_* for create_users_script in swh/web/tests/create_test_*
do do
cat $create_users_script | python{{cypress_python_version}} swh/web/manage.py shell --settings=${DJANGO_SETTINGS_MODULE:-swh.web.settings.tests} cat $create_users_script | python{{cypress_python_version}} swh/web/manage.py shell --settings=${DJANGO_SETTINGS_MODULE:-swh.web.settings.cypress}
done done
# build swh-web static assets in test mode (for code coverage) # build swh-web static assets in test mode (for code coverage)
...@@ -56,7 +56,7 @@ stage('Cypress tests') { ...@@ -56,7 +56,7 @@ stage('Cypress tests') {
cp swh-web-test.sqlite3 swh-web-test{{ n }}.sqlite3 cp swh-web-test.sqlite3 swh-web-test{{ n }}.sqlite3
# run django server on a dedicated port for that test runner and wait for it to be up # run django server on a dedicated port for that test runner and wait for it to be up
python{{cypress_python_version}} swh/web/manage.py runserver --nostatic --settings=${DJANGO_SETTINGS_MODULE:-swh.web.settings.tests} 0.0.0.0:500{{ n }}& python{{cypress_python_version}} swh/web/manage.py runserver --nostatic --settings=${DJANGO_SETTINGS_MODULE:-swh.web.settings.cypress} 0.0.0.0:500{{ n }}&
wait-for-it -t 90 localhost:500{{ n }} wait-for-it -t 90 localhost:500{{ n }}
# execute cypress tests # execute cypress tests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment