From 5c4ca677e1092b0c630f8229bce78a6f4a67906b Mon Sep 17 00:00:00 2001 From: David-Sarah Hopwood Date: Thu, 27 Dec 2012 19:00:22 +0000 Subject: [PATCH] Make the system test nodes have non-ASCII nicknames. This ensures that non-ASCII nicknames are exercised with the real server code. refs #1298 Signed-off-by: David-Sarah Hopwood --- src/allmydata/test/common.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/allmydata/test/common.py b/src/allmydata/test/common.py index e9103a2a..64603130 100644 --- a/src/allmydata/test/common.py +++ b/src/allmydata/test/common.py @@ -470,9 +470,10 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin): iv_dir = self.getdir("introducer") if not os.path.isdir(iv_dir): fileutil.make_dirs(iv_dir) - fileutil.write(os.path.join(iv_dir, 'tahoe.cfg'), \ - "[node]\n" + \ - "web.port = tcp:0:interface=127.0.0.1\n") + fileutil.write(os.path.join(iv_dir, 'tahoe.cfg'), + "[node]\n" + + u"nickname = introducer \u263A\n".encode('utf-8') + + "web.port = tcp:0:interface=127.0.0.1\n") if SYSTEM_TEST_CERTS: os.mkdir(os.path.join(iv_dir, "private")) f = open(os.path.join(iv_dir, "private", "node.pem"), "w") @@ -553,21 +554,26 @@ class SystemTestMixin(pollmixin.PollMixin, testutil.StallMixin): if self.stats_gatherer_furl: config += "stats_gatherer.furl = %s\n" % self.stats_gatherer_furl + nodeconfig = "[node]\n" + nodeconfig += (u"nickname = client %d \u263A\n" % (i,)).encode('utf-8') + if i == 0: # clients[0] runs a webserver and a helper, no key_generator - config += "[node]\n" + config += nodeconfig config += "web.port = tcp:0:interface=127.0.0.1\n" config += "timeout.keepalive = 600\n" config += "[helper]\n" config += "enabled = True\n" - if i == 3: + elif i == 3: # clients[3] runs a webserver and uses a helper, uses # key_generator if self.key_generator_furl: config += "key_generator.furl = %s\n" % self.key_generator_furl - config += "[node]\n" + config += nodeconfig config += "web.port = tcp:0:interface=127.0.0.1\n" config += "timeout.disconnect = 1800\n" + else: + config += nodeconfig fileutil.write(os.path.join(basedir, 'tahoe.cfg'), config) -- 2.37.2