Merge "tests: Stop using distutils.dir_util.mkpath"
This commit is contained in:
@@ -32,7 +32,6 @@ from test.debug_logger import debug_logger
|
|||||||
from test.unit import (
|
from test.unit import (
|
||||||
make_timestamp_iter, patch_policies, mocked_http_conn)
|
make_timestamp_iter, patch_policies, mocked_http_conn)
|
||||||
from time import time
|
from time import time
|
||||||
from distutils.dir_util import mkpath
|
|
||||||
|
|
||||||
from eventlet import spawn, Timeout
|
from eventlet import spawn, Timeout
|
||||||
|
|
||||||
@@ -232,7 +231,7 @@ class TestObjectUpdater(unittest.TestCase):
|
|||||||
asyncdir = os.path.join(self.sda1, ASYNCDIR_BASE)
|
asyncdir = os.path.join(self.sda1, ASYNCDIR_BASE)
|
||||||
|
|
||||||
prefix_dir = os.path.join(asyncdir, 'abc')
|
prefix_dir = os.path.join(asyncdir, 'abc')
|
||||||
mkpath(prefix_dir)
|
mkdirs(prefix_dir)
|
||||||
|
|
||||||
# A non-directory where directory is expected should just be
|
# A non-directory where directory is expected should just be
|
||||||
# skipped, but should not stop processing of subsequent
|
# skipped, but should not stop processing of subsequent
|
||||||
@@ -306,7 +305,7 @@ class TestObjectUpdater(unittest.TestCase):
|
|||||||
def test_sweep_logs(self):
|
def test_sweep_logs(self):
|
||||||
asyncdir = os.path.join(self.sda1, ASYNCDIR_BASE)
|
asyncdir = os.path.join(self.sda1, ASYNCDIR_BASE)
|
||||||
prefix_dir = os.path.join(asyncdir, 'abc')
|
prefix_dir = os.path.join(asyncdir, 'abc')
|
||||||
mkpath(prefix_dir)
|
mkdirs(prefix_dir)
|
||||||
|
|
||||||
for o, t in [('abc', 123), ('def', 234), ('ghi', 345),
|
for o, t in [('abc', 123), ('def', 234), ('ghi', 345),
|
||||||
('jkl', 456), ('mno', 567)]:
|
('jkl', 456), ('mno', 567)]:
|
||||||
@@ -378,7 +377,7 @@ class TestObjectUpdater(unittest.TestCase):
|
|||||||
for policy in _mocked_policies:
|
for policy in _mocked_policies:
|
||||||
asyncdir = os.path.join(self.sda1, get_async_dir(policy.idx))
|
asyncdir = os.path.join(self.sda1, get_async_dir(policy.idx))
|
||||||
prefix_dir = os.path.join(asyncdir, 'abc')
|
prefix_dir = os.path.join(asyncdir, 'abc')
|
||||||
mkpath(prefix_dir)
|
mkdirs(prefix_dir)
|
||||||
|
|
||||||
for o, t in [('abc', 123), ('def', 234), ('ghi', 345)]:
|
for o, t in [('abc', 123), ('def', 234), ('ghi', 345)]:
|
||||||
ohash = hash_path('account', 'container%d' % policy.idx, o)
|
ohash = hash_path('account', 'container%d' % policy.idx, o)
|
||||||
|
Reference in New Issue
Block a user