summaryrefslogtreecommitdiffstats
path: root/swift/1.4.8/swift.diff
diff options
context:
space:
mode:
Diffstat (limited to 'swift/1.4.8/swift.diff')
-rw-r--r--swift/1.4.8/swift.diff136
1 files changed, 0 insertions, 136 deletions
diff --git a/swift/1.4.8/swift.diff b/swift/1.4.8/swift.diff
index 8ed5070e11a..943ec9f037e 100644
--- a/swift/1.4.8/swift.diff
+++ b/swift/1.4.8/swift.diff
@@ -659,139 +659,3 @@ index 17613b8..d277d28 100644
from swift.common.exceptions import ChunkReadTimeout, \
ChunkWriteTimeout, ConnectionTimeout
-diff --git a/test/__init__.py b/test/__init__.py
-index ef2ce31..363a051 100644
---- a/test/__init__.py
-+++ b/test/__init__.py
-@@ -6,8 +6,16 @@ import sys
- import os
- from ConfigParser import MissingSectionHeaderError
- from StringIO import StringIO
--
- from swift.common.utils import readconf
-+from swift.common.utils import plugin_enabled
-+if plugin_enabled():
-+ from swift.plugins.constraints import MAX_OBJECT_NAME_LENGTH, \
-+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
-+ MAX_FILE_SIZE
-+else:
-+ from swift.common.constraints import MAX_OBJECT_NAME_LENGTH, \
-+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
-+ MAX_FILE_SIZE
-
- setattr(__builtin__, '_', lambda x: x)
-
-diff --git a/test/functional/tests.py b/test/functional/tests.py
-index b25b4fd..8d12f58 100644
---- a/test/functional/tests.py
-+++ b/test/functional/tests.py
-@@ -31,6 +31,16 @@ import urllib
- from test import get_config
- from swift import Account, AuthenticationFailed, Connection, Container, \
- File, ResponseError
-+from test import plugin_enabled
-+if plugin_enabled():
-+ from test import MAX_OBJECT_NAME_LENGTH, \
-+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
-+ MAX_FILE_SIZE
-+else:
-+ from test import MAX_OBJECT_NAME_LENGTH, \
-+ MAX_CONTAINER_NAME_LENGTH, MAX_ACCOUNT_NAME_LENGTH, \
-+ MAX_FILE_SIZE
-+
-
- config = get_config()
-
-@@ -361,7 +371,7 @@ class TestContainer(Base):
- set_up = False
-
- def testContainerNameLimit(self):
-- limit = 256
-+ limit = MAX_CONTAINER_NAME_LENGTH
-
- for l in (limit-100, limit-10, limit-1, limit,
- limit+1, limit+10, limit+100):
-@@ -949,7 +959,7 @@ class TestFile(Base):
- self.assert_status(404)
-
- def testNameLimit(self):
-- limit = 1024
-+ limit = MAX_OBJECT_NAME_LENGTH
-
- for l in (1, 10, limit/2, limit-1, limit, limit+1, limit*2):
- file = self.env.container.file('a'*l)
-@@ -1093,7 +1103,7 @@ class TestFile(Base):
- self.assert_(file.read(hdrs={'Range': r}) == data[0:1000])
-
- def testFileSizeLimit(self):
-- limit = 5*2**30 + 2
-+ limit = MAX_FILE_SIZE
- tsecs = 3
-
- for i in (limit-100, limit-10, limit-1, limit, limit+1, limit+10,
-diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py
-index 075700e..5b6f32d 100644
---- a/test/unit/obj/test_server.py
-+++ b/test/unit/obj/test_server.py
-@@ -1355,7 +1355,7 @@ class TestObjectController(unittest.TestCase):
-
- def test_max_object_name_length(self):
- timestamp = normalize_timestamp(time())
-- req = Request.blank('/sda1/p/a/c/' + ('1' * 1024),
-+ req = Request.blank('/sda1/p/a/c/' + ('1' * MAX_OBJECT_NAME_LENGTH),
- environ={'REQUEST_METHOD': 'PUT'},
- headers={'X-Timestamp': timestamp,
- 'Content-Length': '4',
-diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
-index 364370e..c17fe59 100644
---- a/test/unit/proxy/test_server.py
-+++ b/test/unit/proxy/test_server.py
-@@ -21,7 +21,6 @@ import os
- import sys
- import unittest
- from nose import SkipTest
--from ConfigParser import ConfigParser
- from contextlib import contextmanager
- from cStringIO import StringIO
- from gzip import GzipFile
-@@ -44,8 +43,18 @@ from swift.account import server as account_server
- from swift.container import server as container_server
- from swift.obj import server as object_server
- from swift.common import ring
--from swift.common.constraints import MAX_META_NAME_LENGTH, \
-- MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, MAX_FILE_SIZE
-+from swift.common.utils import plugin_enabled
-+if plugin_enabled():
-+ from swift.plugins.constraints import MAX_META_NAME_LENGTH, \
-+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
-+ MAX_FILE_SIZE, MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH, \
-+ MAX_OBJECT_NAME_LENGTH
-+else:
-+ from swift.plugins.constraints import MAX_META_NAME_LENGTH, \
-+ MAX_META_VALUE_LENGTH, MAX_META_COUNT, MAX_META_OVERALL_SIZE, \
-+ MAX_FILE_SIZE, MAX_ACCOUNT_NAME_LENGTH, MAX_CONTAINER_NAME_LENGTH, \
-+ MAX_OBJECT_NAME_LENGTH
-+
- from swift.common.utils import mkdirs, normalize_timestamp, NullLogger
- from swift.common.wsgi import monkey_patch_mimetools
-
-@@ -3207,7 +3216,8 @@ class TestContainerController(unittest.TestCase):
- def test_PUT_max_container_name_length(self):
- with save_globals():
- controller = proxy_server.ContainerController(self.app, 'account',
-- '1' * 256)
-+ '1' *
-+ MAX_CONTAINER_NAME_LENGTH,)
- self.assert_status_map(controller.PUT,
- (200, 200, 200, 201, 201, 201), 201,
- missing_container=True)
-@@ -3813,7 +3823,8 @@ class TestAccountController(unittest.TestCase):
- def test_PUT_max_account_name_length(self):
- with save_globals():
- self.app.allow_account_management = True
-- controller = proxy_server.AccountController(self.app, '1' * 256)
-+ controller = proxy_server.AccountController(self.app, '1' *
-+ MAX_ACCOUNT_NAME_LENGTH)
- self.assert_status_map(controller.PUT, (201, 201, 201), 201)
- controller = proxy_server.AccountController(self.app, '2' * 257)
- self.assert_status_map(controller.PUT, (201, 201, 201), 400)