From: Brian Warner Date: Tue, 19 May 2009 03:41:01 +0000 (-0700) Subject: test_introducer.py: add a test for the python2.4.0/2.4.1 bug in base64.b32decode X-Git-Url: https://git.rkrishnan.org/vdrive//%22news.html/%22?a=commitdiff_plain;h=9f0bc04d32248d668d4974590c9a030158d6bf33;p=tahoe-lafs%2Ftahoe-lafs.git test_introducer.py: add a test for the python2.4.0/2.4.1 bug in base64.b32decode --- diff --git a/src/allmydata/test/test_introducer.py b/src/allmydata/test/test_introducer.py index 760c4e0d..b0e54afe 100644 --- a/src/allmydata/test/test_introducer.py +++ b/src/allmydata/test/test_introducer.py @@ -12,6 +12,7 @@ from twisted.application import service from allmydata.interfaces import InsufficientVersionError from allmydata.introducer.client import IntroducerClient from allmydata.introducer.server import IntroducerService +from allmydata.introducer.common import make_index # test compatibility with old introducer .tac files from allmydata.introducer import IntroducerNode from allmydata.introducer import old @@ -272,3 +273,14 @@ class NonV1Server(SystemTestMixin, unittest.TestCase): d.addCallback(_done) return d +class Index(unittest.TestCase): + def test_make_index(self): + # make sure we have a working base64.b32decode. The one in + # python2.4.[01] was broken. + ann = ('pb://t5g7egomnnktbpydbuijt6zgtmw4oqi5@127.0.0.1:51857/hfzv36i', + 'storage', 'RIStorageServer.tahoe.allmydata.com', + 'plancha', 'allmydata-tahoe/1.4.1', '1.0.0') + (nodeid, service_name) = make_index(ann) + self.failUnlessEqual(nodeid, "\x9fM\xf2\x19\xcckU0\xbf\x03\r\x10\x99\xfb&\x9b-\xc7A\x1d") + self.failUnlessEqual(service_name, "storage") +