mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-06 09:31:43 +00:00
test_system: oops, don't assume that all files in storage/ are in a deep storage/shares/prefix/si/shnum path, since now the crawler pickle has a short path
This commit is contained in:
parent
b9c4f4bdf6
commit
a04d3b8fe8
@ -437,7 +437,9 @@ class SystemTest(SystemTestMixin, unittest.TestCase):
|
|||||||
if not filenames:
|
if not filenames:
|
||||||
continue
|
continue
|
||||||
pieces = dirpath.split(os.sep)
|
pieces = dirpath.split(os.sep)
|
||||||
if pieces[-4] == "storage" and pieces[-3] == "shares":
|
if (len(pieces) >= 5
|
||||||
|
and pieces[-4] == "storage"
|
||||||
|
and pieces[-3] == "shares"):
|
||||||
# we're sitting in .../storage/shares/$START/$SINDEX , and there
|
# we're sitting in .../storage/shares/$START/$SINDEX , and there
|
||||||
# are sharefiles here
|
# are sharefiles here
|
||||||
assert pieces[-5].startswith("client")
|
assert pieces[-5].startswith("client")
|
||||||
@ -1311,7 +1313,9 @@ class SystemTest(SystemTestMixin, unittest.TestCase):
|
|||||||
if not filenames:
|
if not filenames:
|
||||||
continue
|
continue
|
||||||
pieces = dirpath.split(os.sep)
|
pieces = dirpath.split(os.sep)
|
||||||
if pieces[-4] == "storage" and pieces[-3] == "shares":
|
if (len(pieces) >= 4
|
||||||
|
and pieces[-4] == "storage"
|
||||||
|
and pieces[-3] == "shares"):
|
||||||
# we're sitting in .../storage/shares/$START/$SINDEX , and there
|
# we're sitting in .../storage/shares/$START/$SINDEX , and there
|
||||||
# are sharefiles here
|
# are sharefiles here
|
||||||
filename = os.path.join(dirpath, filenames[0])
|
filename = os.path.join(dirpath, filenames[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user