summaryrefslogtreecommitdiffstats
path: root/test/functional/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/tests.py')
-rw-r--r--test/functional/tests.py80
1 files changed, 2 insertions, 78 deletions
diff --git a/test/functional/tests.py b/test/functional/tests.py
index f58e7f3..dcd8b51 100644
--- a/test/functional/tests.py
+++ b/test/functional/tests.py
@@ -67,7 +67,7 @@ conf_exists = constraints_conf.read('/etc/swift/swift.conf')
# Constraints are set first from the test config, then from
# /etc/swift/swift.conf if it exists. If swift.conf doesn't exist,
# then limit test coverage. This allows SAIO tests to work fine but
-# requires remote funtional testing to know something about the cluster
+# requires remote functional testing to know something about the cluster
# that is being tested.
config = get_config('func_test')
for k in default_constraints:
@@ -514,7 +514,6 @@ class TestContainer(Base):
prefixs = ['alpha/', 'beta/', 'kappa/']
prefix_files = {}
- all_files = []
for prefix in prefixs:
prefix_files[prefix] = []
@@ -791,7 +790,7 @@ class TestContainerPathsEnv:
stored_files.add(f)
cls.stored_files = sorted(stored_files)
-
+
class TestContainerPaths(Base):
@@ -1231,7 +1230,6 @@ class TestFile(Base):
def testRangedGetsWithLWSinHeader(self):
#Skip this test until webob 1.2 can tolerate LWS in Range header.
file_length = 10000
- range_size = file_length / 10
file = self.env.container.file(Utils.create_name())
data = file.write_random(file_length)
@@ -1567,33 +1565,6 @@ class TestFile(Base):
info = file.info()
self.assertEquals(etag, info['etag'])
- def testObjectManifest(self):
- if (web_front_end == 'apache2'):
- raise SkipTest()
- data = File.random_data(10000)
- parts = random.randrange(2,10)
- charsEachPart = len(data)/parts
- for i in range(parts+1):
- if i==0 :
- file = self.env.container.file('objectmanifest')
- hdrs={}
- hdrs['Content-Length']='0'
- hdrs['X-Object-Manifest']=str(self.env.container.name)+'/objectmanifest'
- self.assert_(file.write('',hdrs=hdrs))
- self.assert_(file.name in self.env.container.files())
- self.assert_(file.read() == '')
- elif i==parts :
- file = self.env.container.file('objectmanifest'+'-'+str(i))
- segment=data[ (i-1)*charsEachPart :]
- self.assertTrue(file.write(segment))
- else :
- file = self.env.container.file('objectmanifest'+'-'+str(i))
- segment=data[ (i-1)*charsEachPart : i*charsEachPart]
- self.assertTrue(file.write(segment))
- #matching the manifest file content with orignal data, as etag won't match
- file = self.env.container.file('objectmanifest')
- data_read = file.read()
- self.assertEquals(data,data_read)
class TestFileUTF8(Base2, TestFile):
set_up = False
@@ -1682,53 +1653,6 @@ class TestFileComparison(Base):
self.assert_status(412)
-class TestObjectVersioningEnv:
- @classmethod
- def setUp(cls):
- cls.conn = Connection(config)
- cls.conn.authenticate()
- cls.account = Account(cls.conn, config.get('account',
- config['username']))
- cls.account.delete_containers()
- cls.containers = {}
- #create two containers one for object other for versions of objects
- for i in range(2):
- hdrs={}
- if i==0:
- hdrs={'X-Versions-Location':'versions'}
- cont = cls.containers['object'] = cls.account.container('object')
- else:
- cont = cls.containers['versions'] = cls.account.container('versions')
- if not cont.create(hdrs=hdrs):
- raise ResponseError(cls.conn.response)
- cls.containers.append(cont)
-
-
-class TestObjectVersioning(Base):
- env = TestObjectVersioningEnv
- set_up = False
-
- def testObjectVersioning(self):
- versions = random.randrange(2,10)
- dataArr=[]
- #create versions
- for i in range(versions):
- data = File.random_data(10000*(i+1))
- file = self.env.containers['object'].file('object')
- self.assertTrue(file.write(data))
- dataArr.append(data)
- cont = self.env.containers['versions']
- info = cont.info()
- self.assertEquals(info['object_count'], versions-1)
- #match the current version of object with data in arr and delete it
- for i in range(versions):
- data = dataArr[-(i+1)]
- file = self.env.containers['object'].file('object')
- self.assertEquals(data,file.read())
- self.assert_(file.delete())
- self.assert_status(204)
-
-
class TestFileComparisonUTF8(Base2, TestFileComparison):
set_up = False