mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-21 16:39:38 +00:00
storage_index is a byte string
and Python 3 cares
This commit is contained in:
@ -1018,7 +1018,7 @@ class Server(unittest.TestCase):
|
|||||||
ss = StorageServer(workdir, b"\x00" * 20, discard_storage=True)
|
ss = StorageServer(workdir, b"\x00" * 20, discard_storage=True)
|
||||||
ss.setServiceParent(self.sparent)
|
ss.setServiceParent(self.sparent)
|
||||||
|
|
||||||
upload_immutable(ss, "si0", b"r" * 32, b"c" * 32, {0: b""})
|
upload_immutable(ss, b"si0", b"r" * 32, b"c" * 32, {0: b""})
|
||||||
ss.remote_advise_corrupt_share(b"immutable", b"si0", 0,
|
ss.remote_advise_corrupt_share(b"immutable", b"si0", 0,
|
||||||
b"This share smells funny.\n")
|
b"This share smells funny.\n")
|
||||||
|
|
||||||
@ -1033,7 +1033,7 @@ class Server(unittest.TestCase):
|
|||||||
ss.setServiceParent(self.sparent)
|
ss.setServiceParent(self.sparent)
|
||||||
|
|
||||||
si0_s = base32.b2a(b"si0")
|
si0_s = base32.b2a(b"si0")
|
||||||
upload_immutable(ss, "si0", b"r" * 32, b"c" * 32, {0: b""})
|
upload_immutable(ss, b"si0", b"r" * 32, b"c" * 32, {0: b""})
|
||||||
ss.remote_advise_corrupt_share(b"immutable", b"si0", 0,
|
ss.remote_advise_corrupt_share(b"immutable", b"si0", 0,
|
||||||
b"This share smells funny.\n")
|
b"This share smells funny.\n")
|
||||||
reportdir = os.path.join(workdir, "corruption-advisories")
|
reportdir = os.path.join(workdir, "corruption-advisories")
|
||||||
@ -1082,7 +1082,7 @@ class Server(unittest.TestCase):
|
|||||||
ss.setServiceParent(self.sparent)
|
ss.setServiceParent(self.sparent)
|
||||||
|
|
||||||
# Upload one share for this storage index
|
# Upload one share for this storage index
|
||||||
upload_immutable(ss, "si0", b"r" * 32, b"c" * 32, {0: b""})
|
upload_immutable(ss, b"si0", b"r" * 32, b"c" * 32, {0: b""})
|
||||||
|
|
||||||
# And try to submit a corruption advisory about a different share
|
# And try to submit a corruption advisory about a different share
|
||||||
ss.remote_advise_corrupt_share(b"immutable", b"si0", 1,
|
ss.remote_advise_corrupt_share(b"immutable", b"si0", 1,
|
||||||
|
Reference in New Issue
Block a user