mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 15:28:12 +00:00
codechecks / linter
This commit is contained in:
@ -12,7 +12,6 @@ from time import sleep
|
|||||||
from os import mkdir, environ
|
from os import mkdir, environ
|
||||||
from os.path import join, exists
|
from os.path import join, exists
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
from json import loads
|
|
||||||
|
|
||||||
from eliot import (
|
from eliot import (
|
||||||
to_file,
|
to_file,
|
||||||
@ -37,12 +36,9 @@ from .util import (
|
|||||||
_create_node,
|
_create_node,
|
||||||
_tahoe_runner_optional_coverage,
|
_tahoe_runner_optional_coverage,
|
||||||
await_client_ready,
|
await_client_ready,
|
||||||
cli,
|
|
||||||
generate_ssh_key,
|
|
||||||
block_with_timeout,
|
block_with_timeout,
|
||||||
)
|
)
|
||||||
from .grid import (
|
from .grid import (
|
||||||
create_port_allocator,
|
|
||||||
create_flog_gatherer,
|
create_flog_gatherer,
|
||||||
create_grid,
|
create_grid,
|
||||||
)
|
)
|
||||||
|
@ -26,7 +26,6 @@ from twisted.python.procutils import which
|
|||||||
from twisted.internet.defer import (
|
from twisted.internet.defer import (
|
||||||
inlineCallbacks,
|
inlineCallbacks,
|
||||||
returnValue,
|
returnValue,
|
||||||
maybeDeferred,
|
|
||||||
Deferred,
|
Deferred,
|
||||||
)
|
)
|
||||||
from twisted.internet.task import (
|
from twisted.internet.task import (
|
||||||
@ -36,13 +35,6 @@ from twisted.internet.interfaces import (
|
|||||||
IProcessTransport,
|
IProcessTransport,
|
||||||
IProcessProtocol,
|
IProcessProtocol,
|
||||||
)
|
)
|
||||||
from twisted.internet.endpoints import (
|
|
||||||
TCP4ServerEndpoint,
|
|
||||||
)
|
|
||||||
from twisted.internet.protocol import (
|
|
||||||
Factory,
|
|
||||||
Protocol,
|
|
||||||
)
|
|
||||||
from twisted.internet.error import ProcessTerminated
|
from twisted.internet.error import ProcessTerminated
|
||||||
|
|
||||||
from allmydata.node import read_config
|
from allmydata.node import read_config
|
||||||
|
@ -24,6 +24,7 @@ from allmydata.test.common import (
|
|||||||
write_introducer,
|
write_introducer,
|
||||||
)
|
)
|
||||||
from allmydata.node import read_config
|
from allmydata.node import read_config
|
||||||
|
from allmydata.util.iputil import allocate_tcp_port
|
||||||
|
|
||||||
|
|
||||||
if which("docker") is None:
|
if which("docker") is None:
|
||||||
@ -132,8 +133,10 @@ def i2p_introducer_furl(i2p_introducer, temp_dir):
|
|||||||
@pytest_twisted.inlineCallbacks
|
@pytest_twisted.inlineCallbacks
|
||||||
@pytest.mark.skip("I2P tests are not functioning at all, for unknown reasons")
|
@pytest.mark.skip("I2P tests are not functioning at all, for unknown reasons")
|
||||||
def test_i2p_service_storage(reactor, request, temp_dir, flog_gatherer, i2p_network, i2p_introducer_furl):
|
def test_i2p_service_storage(reactor, request, temp_dir, flog_gatherer, i2p_network, i2p_introducer_furl):
|
||||||
yield _create_anonymous_node(reactor, 'carol_i2p', request, temp_dir, flog_gatherer, i2p_network, i2p_introducer_furl)
|
web_port0 = allocate_tcp_port()
|
||||||
yield _create_anonymous_node(reactor, 'dave_i2p', request, temp_dir, flog_gatherer, i2p_network, i2p_introducer_furl)
|
web_port1 = allocate_tcp_port()
|
||||||
|
yield _create_anonymous_node(reactor, 'carol_i2p', web_port0, request, temp_dir, flog_gatherer, i2p_network, i2p_introducer_furl)
|
||||||
|
yield _create_anonymous_node(reactor, 'dave_i2p', web_port1, request, temp_dir, flog_gatherer, i2p_network, i2p_introducer_furl)
|
||||||
# ensure both nodes are connected to "a grid" by uploading
|
# ensure both nodes are connected to "a grid" by uploading
|
||||||
# something via carol, and retrieve it using dave.
|
# something via carol, and retrieve it using dave.
|
||||||
gold_path = join(temp_dir, "gold")
|
gold_path = join(temp_dir, "gold")
|
||||||
@ -179,7 +182,7 @@ def test_i2p_service_storage(reactor, request, temp_dir, flog_gatherer, i2p_netw
|
|||||||
|
|
||||||
|
|
||||||
@pytest_twisted.inlineCallbacks
|
@pytest_twisted.inlineCallbacks
|
||||||
def _create_anonymous_node(reactor, name, request, temp_dir, flog_gatherer, i2p_network, introducer_furl):
|
def _create_anonymous_node(reactor, name, web_port, request, temp_dir, flog_gatherer, i2p_network, introducer_furl):
|
||||||
node_dir = FilePath(temp_dir).child(name)
|
node_dir = FilePath(temp_dir).child(name)
|
||||||
|
|
||||||
print("creating", node_dir.path)
|
print("creating", node_dir.path)
|
||||||
|
@ -15,7 +15,7 @@ from pytest_twisted import ensureDeferred
|
|||||||
|
|
||||||
from . import vectors
|
from . import vectors
|
||||||
from .vectors import parameters
|
from .vectors import parameters
|
||||||
from .util import reconfigure, upload
|
from .util import upload
|
||||||
from .grid import Client
|
from .grid import Client
|
||||||
|
|
||||||
@mark.parametrize('convergence', parameters.CONVERGENCE_SECRETS)
|
@mark.parametrize('convergence', parameters.CONVERGENCE_SECRETS)
|
||||||
|
Reference in New Issue
Block a user