Permalink
Browse files

Fix compat breaking issue in functional tests due to django-tastypie …

…compat issues by hardlocking version
  • Loading branch information...
1 parent 0d3c793 commit e39d156b56962e86a0054ba11304eb37f8a3b46d @svanoort committed Jan 24, 2016
View
@@ -16,7 +16,7 @@ There are two options for how to work with code
+ pyyaml
+ mock
+ django==1.6.5 (for functional testing server)
- + django-tastypie (for functional testing server)
+ + django-tastypie==0.12.1 (for functional testing server)
+ discover (if on a python 2.6 system)
- Avoid a virtualenv unless you *very carefully* set it up for pycurl use (it may not find libcurl)
View
@@ -5,9 +5,9 @@ set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
-UBUNTU_14_VERSION=0.3
-CENTOS6_VERSION=0.3
-PYTHON3_VERSION=0.4
+UBUNTU_14_VERSION=0.4
+CENTOS6_VERSION=0.4
+PYTHON3_VERSION=0.5
docker build -t pyresttest-build-ubuntu-14:$UBUNTU_14_VERSION-SNAPSHOT ./ubuntu14-py27
docker build -t pyresttest-build-centos6:$CENTOS6_VERSION-SNAPSHOT ./centos6-py26
@@ -6,7 +6,7 @@ RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noar
# pycurl is part of yum, and so is python, so we don't install
RUN yum install -y python-pip git-core python-mock rpm-build tar && yum clean all \
- && pip install discover pyyaml django==1.6.5 django-tastypie
+ && pip install discover pyyaml django==1.6.5 django-tastypie==1.6.5
COPY verify_image.py /tmp/verify_image.py
RUN chmod a+rwx /tmp/verify_image.py
@@ -5,7 +5,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y git-core tar \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Python 2 and 3 dependencies, future is just for python 3 compat, sigh
-RUN pip3 install pycurl pyyaml django==1.6.5 django-tastypie future
+RUN pip3 install pycurl pyyaml django==1.6.5 django-tastypie==1.6.5 future
COPY verify_image.py /tmp/verify_image.py
RUN chmod a+rwx /tmp/verify_image.py
@@ -5,7 +5,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y python python-p
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Python 2 and 3 dependencies
-RUN pip install mock pyyaml django==1.6.5 django-tastypie
+RUN pip install mock pyyaml django==1.6.5 django-tastypie==1.6.5
COPY verify_image.py /tmp/verify_image.py
RUN chmod a+rwx /tmp/verify_image.py
@@ -25,11 +25,11 @@ node {
def python3 = docker.build("pyresttest-build-python3:test", 'docker/python3')
stage name:'test/tag', concurrency: 1
- run_test(ubuntu14_py27, 'python', '0.3')
- run_test(centos6_py26, 'python', '0.3')
+ run_test(ubuntu14_py27, 'python', '0.4')
+ run_test(centos6_py26, 'python', '0.4')
// For some inexplicable reasons, the test script here is more brittle than the others
// Direct docker run works, it hit issues with docker.build, so... okay?
- run_test(python3, 'python3', '0.4')
+ run_test(python3, 'python3', '0.5')
}
@@ -114,7 +114,7 @@ void do_clone_run(String pyresttestBranch='master'){
// Libs needed to run pyresttest
String install_libs = 'sudo pip install pyyaml'
String install_libs_py3 = 'sudo pip install pycurl pyyaml future'
- String install_django_libs = 'sudo pip install "django==1.6.5" django-tastypie'
+ String install_django_libs = 'sudo pip install "django==1.6.5" django-tastypie==0.12.1'
// Tests
String testBasic1 = "resttest.py --help | grep 'Usage' "
@@ -153,7 +153,7 @@ void do_directinstall_test(String pyresttestBranch='master') {
// Libs needed to run pyresttest
String install_libs = 'sudo pip install pyyaml'
String install_libs_py3 = 'sudo pip install pycurl pyyaml future'
- String install_django_libs = 'sudo pip install "django==1.6.5" django-tastypie'
+ String install_django_libs = 'sudo pip install "django==1.6.5" django-tastypie==0.12.1'
// Tests
String testBasic1 = "resttest.py --help | grep 'Usage' "
@@ -195,7 +195,7 @@ void do_pip_develop_tests(String pyresttestBranch='master') {
// Libs needed to run pyresttest
String install_libs = 'sudo pip install pyyaml'
String install_libs_py3 = 'sudo pip install pycurl pyyaml future'
- String install_django_libs = 'sudo pip install "django==1.6.5" django-tastypie'
+ String install_django_libs = 'sudo pip install "django==1.6.5" django-tastypie==0.12.1'
// Tests
String testBasic1 = "resttest.py --help | grep 'Usage' "
View
@@ -25,7 +25,7 @@ git clone https://github.com/svanoort/pyresttest.git
Then we'll **install the necessary dependencies** to run it (Django and Django Tastypie):
```shell
-sudo pip install 'django >=1.6, <1.7' django-tastypie
+sudo pip install 'django >=1.6, <1.7' django-tastypie==0.12.1
```
Now **we start a test server in one terminal** (on default port 8000) with some preloaded data, and we will test in a second terminal:
```shell
@@ -45,7 +45,7 @@ Traceback (most recent call last):
This is easy enough to fix though by installing a compatible Django version:
```shell
sudo pip uninstall -y django django-tastypie
-sudo pip install 'django >=1.6, <1.7' django-tastypie
+sudo pip install 'django >=1.6, <1.7' django-tastypie==0.12.1
```
**Before going deeper, let's make sure that server works okay... in our second terminal, we run this:**
```shell
View
@@ -5,7 +5,7 @@
from distutils.core import setup
dependencies = ['pyyaml', 'pycurl']
-test_dependencies = ['django==1.6.5','django-tastypie']
+test_dependencies = ['django==1.6.5','django-tastypie==0.12.1']
# Add additional compatibility shims
if sys.version_info[0] > 2:

0 comments on commit e39d156

Please sign in to comment.