mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-17 14:58:14 +00:00
Remove the magic-folder integration tests
This commit is contained in:
@ -367,97 +367,6 @@ def bob(reactor, temp_dir, introducer_furl, flog_gatherer, storage_nodes, reques
|
||||
return process
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
@log_call(action_type=u"integration:alice:invite", include_args=["temp_dir"])
|
||||
def alice_invite(reactor, alice, temp_dir, request):
|
||||
node_dir = join(temp_dir, 'alice')
|
||||
|
||||
with start_action(action_type=u"integration:alice:magic_folder:create"):
|
||||
# FIXME XXX by the time we see "client running" in the logs, the
|
||||
# storage servers aren't "really" ready to roll yet (uploads fairly
|
||||
# consistently fail if we don't hack in this pause...)
|
||||
proto = _CollectOutputProtocol()
|
||||
_tahoe_runner_optional_coverage(
|
||||
proto,
|
||||
reactor,
|
||||
request,
|
||||
[
|
||||
'magic-folder', 'create',
|
||||
'--poll-interval', '2',
|
||||
'--basedir', node_dir, 'magik:', 'alice',
|
||||
join(temp_dir, 'magic-alice'),
|
||||
]
|
||||
)
|
||||
pytest_twisted.blockon(proto.done)
|
||||
|
||||
with start_action(action_type=u"integration:alice:magic_folder:invite") as a:
|
||||
proto = _CollectOutputProtocol()
|
||||
_tahoe_runner_optional_coverage(
|
||||
proto,
|
||||
reactor,
|
||||
request,
|
||||
[
|
||||
'magic-folder', 'invite',
|
||||
'--basedir', node_dir, 'magik:', 'bob',
|
||||
]
|
||||
)
|
||||
pytest_twisted.blockon(proto.done)
|
||||
invite = proto.output.getvalue()
|
||||
a.add_success_fields(invite=invite)
|
||||
|
||||
with start_action(action_type=u"integration:alice:magic_folder:restart"):
|
||||
# before magic-folder works, we have to stop and restart (this is
|
||||
# crappy for the tests -- can we fix it in magic-folder?)
|
||||
try:
|
||||
alice.transport.signalProcess('TERM')
|
||||
pytest_twisted.blockon(alice.transport.exited)
|
||||
except ProcessExitedAlready:
|
||||
pass
|
||||
with start_action(action_type=u"integration:alice:magic_folder:magic-text"):
|
||||
magic_text = 'Completed initial Magic Folder scan successfully'
|
||||
pytest_twisted.blockon(_run_node(reactor, node_dir, request, magic_text))
|
||||
await_client_ready(alice)
|
||||
return invite
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
@log_call(
|
||||
action_type=u"integration:magic_folder",
|
||||
include_args=["alice_invite", "temp_dir"],
|
||||
)
|
||||
def magic_folder(reactor, alice_invite, alice, bob, temp_dir, request):
|
||||
print("pairing magic-folder")
|
||||
bob_dir = join(temp_dir, 'bob')
|
||||
proto = _CollectOutputProtocol()
|
||||
_tahoe_runner_optional_coverage(
|
||||
proto,
|
||||
reactor,
|
||||
request,
|
||||
[
|
||||
'magic-folder', 'join',
|
||||
'--poll-interval', '1',
|
||||
'--basedir', bob_dir,
|
||||
alice_invite,
|
||||
join(temp_dir, 'magic-bob'),
|
||||
]
|
||||
)
|
||||
pytest_twisted.blockon(proto.done)
|
||||
|
||||
# before magic-folder works, we have to stop and restart (this is
|
||||
# crappy for the tests -- can we fix it in magic-folder?)
|
||||
try:
|
||||
print("Sending TERM to Bob")
|
||||
bob.transport.signalProcess('TERM')
|
||||
pytest_twisted.blockon(bob.transport.exited)
|
||||
except ProcessExitedAlready:
|
||||
pass
|
||||
|
||||
magic_text = 'Completed initial Magic Folder scan successfully'
|
||||
pytest_twisted.blockon(_run_node(reactor, bob_dir, request, magic_text))
|
||||
await_client_ready(bob)
|
||||
return (join(temp_dir, 'magic-alice'), join(temp_dir, 'magic-bob'))
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def chutney(reactor, temp_dir):
|
||||
chutney_dir = join(temp_dir, 'chutney')
|
||||
|
Reference in New Issue
Block a user