Don't test stats gatherer support in the runner
This commit is contained in:
parent
d916c725e6
commit
3fd1b336b4
|
@ -142,9 +142,8 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, RunBinTahoeMixin):
|
||||||
|
|
||||||
|
|
||||||
class CreateNode(unittest.TestCase):
|
class CreateNode(unittest.TestCase):
|
||||||
# exercise "tahoe create-node", create-introducer,
|
# exercise "tahoe create-node", create-introducer, and
|
||||||
# create-key-generator, and create-stats-gatherer, by calling the
|
# create-key-generator by calling the corresponding code as a subroutine.
|
||||||
# corresponding code as a subroutine.
|
|
||||||
|
|
||||||
def workdir(self, name):
|
def workdir(self, name):
|
||||||
basedir = os.path.join("test_runner", "CreateNode", name)
|
basedir = os.path.join("test_runner", "CreateNode", name)
|
||||||
|
@ -243,48 +242,11 @@ class CreateNode(unittest.TestCase):
|
||||||
def test_introducer(self):
|
def test_introducer(self):
|
||||||
self.do_create("introducer", "--hostname=127.0.0.1")
|
self.do_create("introducer", "--hostname=127.0.0.1")
|
||||||
|
|
||||||
def test_stats_gatherer(self):
|
|
||||||
self.do_create("stats-gatherer", "--hostname=127.0.0.1")
|
|
||||||
|
|
||||||
def test_subcommands(self):
|
def test_subcommands(self):
|
||||||
# no arguments should trigger a command listing, via UsageError
|
# no arguments should trigger a command listing, via UsageError
|
||||||
self.failUnlessRaises(usage.UsageError, parse_cli,
|
self.failUnlessRaises(usage.UsageError, parse_cli,
|
||||||
)
|
)
|
||||||
|
|
||||||
@inlineCallbacks
|
|
||||||
def test_stats_gatherer_good_args(self):
|
|
||||||
rc,out,err = yield run_cli("create-stats-gatherer", "--hostname=foo",
|
|
||||||
self.mktemp())
|
|
||||||
self.assertEqual(rc, 0)
|
|
||||||
rc,out,err = yield run_cli("create-stats-gatherer",
|
|
||||||
"--location=tcp:foo:1234",
|
|
||||||
"--port=tcp:1234", self.mktemp())
|
|
||||||
self.assertEqual(rc, 0)
|
|
||||||
|
|
||||||
|
|
||||||
def test_stats_gatherer_bad_args(self):
|
|
||||||
def _test(args):
|
|
||||||
argv = args.split()
|
|
||||||
self.assertRaises(usage.UsageError, parse_cli, *argv)
|
|
||||||
|
|
||||||
# missing hostname/location/port
|
|
||||||
_test("create-stats-gatherer D")
|
|
||||||
|
|
||||||
# missing port
|
|
||||||
_test("create-stats-gatherer --location=foo D")
|
|
||||||
|
|
||||||
# missing location
|
|
||||||
_test("create-stats-gatherer --port=foo D")
|
|
||||||
|
|
||||||
# can't provide both
|
|
||||||
_test("create-stats-gatherer --hostname=foo --port=foo D")
|
|
||||||
|
|
||||||
# can't provide both
|
|
||||||
_test("create-stats-gatherer --hostname=foo --location=foo D")
|
|
||||||
|
|
||||||
# can't provide all three
|
|
||||||
_test("create-stats-gatherer --hostname=foo --location=foo --port=foo D")
|
|
||||||
|
|
||||||
|
|
||||||
class RunNode(common_util.SignalMixin, unittest.TestCase, pollmixin.PollMixin,
|
class RunNode(common_util.SignalMixin, unittest.TestCase, pollmixin.PollMixin,
|
||||||
RunBinTahoeMixin):
|
RunBinTahoeMixin):
|
||||||
|
|
Loading…
Reference in New Issue