mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
Even more debytification of furls.
This commit is contained in:
parent
22c328d6d3
commit
17ec22ab84
@ -295,7 +295,7 @@ class PluginMatchedAnnouncement(SyncTestCase):
|
||||
# notice how the announcement is for a different storage plugin
|
||||
# than the one that is enabled.
|
||||
u"name": u"tahoe-lafs-dummy-v2",
|
||||
u"storage-server-FURL": SOME_FURL.decode("ascii"),
|
||||
u"storage-server-FURL": SOME_FURL,
|
||||
}],
|
||||
}
|
||||
self.publish(server_id, ann, self.introducer_client)
|
||||
@ -323,7 +323,7 @@ class PluginMatchedAnnouncement(SyncTestCase):
|
||||
u"storage-options": [{
|
||||
# and this announcement is for a plugin with a matching name
|
||||
u"name": plugin_name,
|
||||
u"storage-server-FURL": SOME_FURL.decode("ascii"),
|
||||
u"storage-server-FURL": SOME_FURL,
|
||||
}],
|
||||
}
|
||||
self.publish(server_id, ann, self.introducer_client)
|
||||
@ -374,7 +374,7 @@ class PluginMatchedAnnouncement(SyncTestCase):
|
||||
u"storage-options": [{
|
||||
# and this announcement is for a plugin with a matching name
|
||||
u"name": plugin_name,
|
||||
u"storage-server-FURL": SOME_FURL.decode("ascii"),
|
||||
u"storage-server-FURL": SOME_FURL,
|
||||
}],
|
||||
}
|
||||
self.publish(server_id, ann, self.introducer_client)
|
||||
@ -525,7 +525,7 @@ storage:
|
||||
ann:
|
||||
anonymous-storage-FURL: {furl}
|
||||
permutation-seed-base32: aaaaaaaaaaaaaaaaaaaaaaaa
|
||||
""".format(furl=SOME_FURL.decode("utf-8"))
|
||||
""".format(furl=SOME_FURL)
|
||||
servers = yamlutil.safe_load(servers_yaml)
|
||||
permseed = base32.a2b(b"aaaaaaaaaaaaaaaaaaaaaaaa")
|
||||
broker.set_static_servers(servers["storage"])
|
||||
@ -541,7 +541,7 @@ storage:
|
||||
|
||||
ann2 = {
|
||||
"service-name": "storage",
|
||||
"anonymous-storage-FURL": "pb://{}@nowhere/fake2".format(base32.b2a(b"1")),
|
||||
"anonymous-storage-FURL": "pb://{}@nowhere/fake2".format(str(base32.b2a(b"1"), "utf-8")),
|
||||
"permutation-seed-base32": "bbbbbbbbbbbbbbbbbbbbbbbb",
|
||||
}
|
||||
broker._got_announcement(key_s, ann2)
|
||||
@ -605,7 +605,7 @@ storage:
|
||||
}
|
||||
|
||||
def add_one_server(x):
|
||||
data["anonymous-storage-FURL"] = "pb://%s@nowhere/fake" % (base32.b2a(b"%d" % x),)
|
||||
data["anonymous-storage-FURL"] = "pb://%s@nowhere/fake" % (str(base32.b2a(b"%d" % x), "ascii"),)
|
||||
tub = Mock()
|
||||
new_tubs.append(tub)
|
||||
got_announcement(b'v0-1234-%d' % x, data)
|
||||
|
Loading…
Reference in New Issue
Block a user