TE-2861 Use correct version of Django in tests (#20271)

This commit is contained in:
Jeremy Bowman
2019-04-19 10:44:41 -04:00
committed by GitHub
parent e99c3852b3
commit 5424155cd0
2 changed files with 10 additions and 2 deletions

View File

@@ -14,13 +14,21 @@ else
XDIST_GIT_FETCH_STRING="$XDIST_GIT_BRANCH:$XDIST_GIT_BRANCH"
fi
# Install the correct version of Django depending on which tox environment (if any) is in use
if [[ -z ${TOX_ENV+x} ]] || [[ ${TOX_ENV} == 'null' ]]; then
DJANGO_REQUIREMENT="-r requirements/edx/django.txt"
else
DJANGO_REQUIREMENT=$(pip freeze | grep "^[Dd]jango==")
fi
ip_list=$(<pytest_task_ips.txt)
for ip in $(echo $ip_list | sed "s/,/ /g")
do
container_reqs_cmd="ssh -o StrictHostKeyChecking=no ubuntu@$ip 'cd /edx/app/edxapp;
git clone --branch master --depth 1 --no-tags -q https://github.com/edx/edx-platform.git; cd edx-platform;
git fetch --depth=1 --no-tags -q origin ${XDIST_GIT_FETCH_STRING}; git checkout -q ${XDIST_GIT_BRANCH};
source /edx/app/edxapp/edxapp_env; pip install -qr requirements/edx/testing.txt; mkdir reports' & "
source /edx/app/edxapp/edxapp_env;
pip install -q ${DJANGO_REQUIREMENT} -r requirements/edx/testing.txt; mkdir reports' & "
cmd=$cmd$container_reqs_cmd
done

View File

@@ -54,7 +54,7 @@ passenv =
XDIST_NUM_TASKS
XDIST_REMOTE_NUM_PROCESSES
deps =
django111: Django>=1.11,<2
django111: -r requirements/edx/django.txt
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
-r requirements/edx/testing.txt