diff --git a/requirements.txt b/requirements.txt index bbac51a..1e3b339 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ dnspython>=1.9.4 eventlet>=0.9.15 greenlet>=0.3.1 -netifaces>=0.5 +netifaces>=0.5,!=0.10.0,!=0.10.1 pastedeploy>=1.3.3 simplejson>=2.0.9 xattr>=0.4 diff --git a/swiftonfile/swift/__init__.py b/swiftonfile/swift/__init__.py index 17a3222..477987a 100644 --- a/swiftonfile/swift/__init__.py +++ b/swiftonfile/swift/__init__.py @@ -45,6 +45,6 @@ class PkgInfo(object): ### ### Change the Package version here ### -_pkginfo = PkgInfo('2.0.0', '0', 'swiftonfile', False) +_pkginfo = PkgInfo('2.1.0', '0', 'swiftonfile', False) __version__ = _pkginfo.pretty_version __canonical_version__ = _pkginfo.canonical_version diff --git a/test-requirements.txt b/test-requirements.txt index c3d1197..a5a7118 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,11 +1,11 @@ # Hacking already pins down pep8, pyflakes and flake8 -hacking>=0.5.6,<0.6 +hacking>=0.8.0,<0.9 coverage nose nosexcover openstack.nose_plugin nosehtmloutput +oslosphinx sphinx>=1.1.2,<1.2 -mock>=0.8.0 +mock>=1.0 python-swiftclient -prettytable diff --git a/test/functional/test_object.py b/test/functional/test_object.py index cbdca86..6b29800 100755 --- a/test/functional/test_object.py +++ b/test/functional/test_object.py @@ -916,6 +916,11 @@ class TestObject(unittest.TestCase): if tf.skip: raise SkipTest + try: + strict_cors = tf.cluster_info['swift']['strict_cors_mode'] + except KeyError: + raise SkipTest("cors mode is unknown") + def put_cors_cont(url, token, parsed, conn, orig): conn.request( 'PUT', '%s/%s' % (parsed.path, self.container), @@ -989,11 +994,6 @@ class TestObject(unittest.TestCase): resp.read() self.assertEquals(resp.status, 401) - try: - strict_cors = tf.cluster_info['swift']['strict_cors_mode'] - except KeyError: - strict_cors = False - if strict_cors: resp = retry(check_cors, 'GET', 'cat', {'Origin': 'http://m.com'}) diff --git a/test/functional/tests.py b/test/functional/tests.py index 4d9179e..bbe370f 100644 --- a/test/functional/tests.py +++ b/test/functional/tests.py @@ -28,8 +28,6 @@ import uuid import eventlet from nose import SkipTest -from swift.common.storage_policy import POLICY - from test.functional import normalized_urls, load_constraint, cluster_info import test.functional as tf from test.functional.swift_test_client import Account, Connection, File, \ @@ -2121,13 +2119,13 @@ class TestCrossPolicyObjectVersioningEnv(object): cls.versions_container = cls.account.container(prefix + "-versions") if not cls.versions_container.create( - {POLICY: policy['name']}): + {'X-Storage-Policy': policy['name']}): raise ResponseError(cls.conn.response) cls.container = cls.account.container(prefix + "-objs") if not cls.container.create( hdrs={'X-Versions-Location': cls.versions_container.name, - POLICY: version_policy['name']}): + 'X-Storage-Policy': version_policy['name']}): raise ResponseError(cls.conn.response) container_info = cls.container.info() diff --git a/tox.ini b/tox.ini index 4d67472..60f94f2 100644 --- a/tox.ini +++ b/tox.ini @@ -18,10 +18,10 @@ setenv = VIRTUAL_ENV={envdir} NOSE_COVER_BRANCHES=1 NOSE_COVER_PACKAGE=swiftonfile deps = -# GitHub's .zip URL won't work! pip supports installing from git repos. +# Note: pip supports installing from git repos. # https://pip.pypa.io/en/latest/reference/pip_install.html#git - git+https://github.com/openstack/swift.git@2.0.0 - -r{toxinidir}/requirements.txt +# Example: git+https://github.com/openstack/swift.git@2.0.0 + https://launchpad.net/swift/juno/2.1.0/+download/swift-2.1.0.tar.gz -r{toxinidir}/test-requirements.txt changedir = {toxinidir}/test/unit commands = nosetests -v {posargs}