setup: fix a couple instances of hard-coded 'allmydata-tahoe' in the scripts, tighten the tests (as suggested by David-Sarah)
This commit is contained in:
parent
44edecb36c
commit
fd874d6669
|
@ -2,6 +2,7 @@
|
|||
import os, sys
|
||||
from twisted.python import usage
|
||||
from allmydata.scripts.common import BasedirMixin, NoDefaultBasedirMixin
|
||||
import allmydata
|
||||
|
||||
class CreateClientOptions(BasedirMixin, usage.Options):
|
||||
optParameters = [
|
||||
|
@ -29,7 +30,7 @@ client_tac = """
|
|||
# -*- python -*-
|
||||
|
||||
import pkg_resources
|
||||
pkg_resources.require('allmydata-tahoe')
|
||||
pkg_resources.require('%s')
|
||||
pkg_resources.require('twisted')
|
||||
from allmydata import client
|
||||
from twisted.application import service
|
||||
|
@ -38,13 +39,13 @@ c = client.Client()
|
|||
|
||||
application = service.Application("allmydata_client")
|
||||
c.setServiceParent(application)
|
||||
"""
|
||||
""" % (allmydata.__appname__,)
|
||||
|
||||
introducer_tac = """
|
||||
# -*- python -*-
|
||||
|
||||
import pkg_resources
|
||||
pkg_resources.require('allmydata-tahoe')
|
||||
pkg_resources.require('%s')
|
||||
pkg_resources.require('twisted')
|
||||
from allmydata import introducer
|
||||
from twisted.application import service
|
||||
|
@ -53,7 +54,7 @@ c = introducer.IntroducerNode()
|
|||
|
||||
application = service.Application("allmydata_introducer")
|
||||
c.setServiceParent(application)
|
||||
"""
|
||||
""" % (allmydata.__appname__,)
|
||||
|
||||
def write_node_config(c, config):
|
||||
# this is shared between clients and introducers
|
||||
|
|
|
@ -6,7 +6,8 @@ import pkg_resources
|
|||
pkg_resources.require('twisted')
|
||||
from twisted.python import usage
|
||||
|
||||
pkg_resources.require('allmydata-tahoe')
|
||||
import allmydata
|
||||
pkg_resources.require(allmydata.__appname__)
|
||||
from allmydata.scripts.common import BaseOptions
|
||||
from allmydata.scripts import debug, create_node, startstop_node, cli, keygen, stats_gatherer
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin):
|
|||
def _cb(res):
|
||||
out, err, rc_or_sig = res
|
||||
self.failUnlessEqual(rc_or_sig, 0, res)
|
||||
self.failUnless(out.startswith(allmydata.__appname__), res)
|
||||
self.failUnless(out.startswith(allmydata.__appname__+':'), res)
|
||||
self.failIfIn("DeprecationWarning", out, res)
|
||||
self.failUnlessEqual(err, "", res)
|
||||
d.addCallback(_cb)
|
||||
|
|
Loading…
Reference in New Issue