more integration tests

This commit is contained in:
meejah 2018-11-28 01:20:51 -07:00
parent c27964813f
commit 992314471e

View File

@ -46,6 +46,35 @@ def test_remove_client(reactor):
reactor, "grid-manager", "--config", "-", "create",
)
gm_config = yield util.run_tahoe(
reactor, "grid-manager", "--config", "-", "add",
"alice", "pub-v0-kzug3ut2m7ziihf3ndpqlquuxeie4foyl36wn54myqc4wmiwe4ga",
stdin=gm_config,
)
gm_config = yield util.run_tahoe(
reactor, "grid-manager", "--config", "-", "add",
"bob", "pub-v0-kvxhb3nexybmipkrar2ztfrwp4uxxsmrjzkpzafit3ket4u5yldq",
stdin=gm_config,
)
assert json.loads(gm_config)['storage_servers'].has_key("alice")
assert json.loads(gm_config)['storage_servers'].has_key("bob")
return
gm_config = yield util.run_tahoe(
reactor, "grid-manager", "--config", "-", "remove",
"alice",
stdin=gm_config,
)
assert not json.loads(gm_config)['storage_servers'].has_key('alice')
assert json.loads(gm_config)['storage_servers'].has_key('bob')
@pytest.inlineCallbacks
def test_remove_last_client(reactor):
gm_config = yield util.run_tahoe(
reactor, "grid-manager", "--config", "-", "create",
)
gm_config = yield util.run_tahoe(
reactor, "grid-manager", "--config", "-", "add",
"alice", "pub-v0-kzug3ut2m7ziihf3ndpqlquuxeie4foyl36wn54myqc4wmiwe4ga",