Commit 14c72dbd authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Adjust pithos livetest to use container_info_cache

Refs: #3707
parent 0ef0db9f
......@@ -663,11 +663,14 @@ class Pithos(livetest.Generic):
self.assertNotEqual(sc1, sc2)
"""Upload an object to download"""
container_info_cache = dict()
trg_fname = 'remotefile_%s' % self.now
f_size = 59247824
src_f = self.create_large_file(f_size)
print('\tUploading...')
r = self.client.upload_object(trg_fname, src_f)
r = self.client.upload_object(
trg_fname, src_f,
container_info_cache=container_info_cache)
print('\tDownloading...')
self.files.append(NamedTemporaryFile())
dnl_f = self.files[-1]
......@@ -683,7 +686,9 @@ class Pithos(livetest.Generic):
trg_fname = 'boringfile_%s' % self.now
src_f = self.create_boring_file(42)
print('\tUploading boring file...')
self.client.upload_object(trg_fname, src_f)
self.client.upload_object(
trg_fname, src_f,
container_info_cache=container_info_cache)
print('\tDownloading boring file...')
self.files.append(NamedTemporaryFile())
dnl_f = self.files[-1]
......
......@@ -361,8 +361,9 @@ class PithosClient(PithosRestClient):
self._assert_container()
#init
block_info = (blocksize, blockhash, size, nblocks) =\
self._get_file_block_info(f, size, container_info_cache)
block_info = (
blocksize, blockhash, size, nblocks) = self._get_file_block_info(
f, size, container_info_cache)
(hashes, hmap, offset) = ([], {}, 0)
if not content_type:
content_type = 'application/octet-stream'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment