mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-20 06:34:20 +01:00
backup: cleanup flake8 nits
This commit is contained in:
committed by
Christian Decker
parent
be523aa54f
commit
1f05674b5b
@@ -245,7 +245,6 @@ class FileBackend(Backend):
|
|||||||
assert(version == self.version)
|
assert(version == self.version)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def resolve_backend_class(backend_url):
|
def resolve_backend_class(backend_url):
|
||||||
backend_map: Mapping[str, Type[Backend]] = {
|
backend_map: Mapping[str, Type[Backend]] = {
|
||||||
'file': FileBackend,
|
'file': FileBackend,
|
||||||
@@ -353,7 +352,6 @@ def kill(message: str):
|
|||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
plugin.add_option(
|
plugin.add_option(
|
||||||
'backup-destination', None,
|
'backup-destination', None,
|
||||||
'UNUSED. Kept for backward compatibility only. Please update your configuration to remove this option.'
|
'UNUSED. Kept for backward compatibility only. Please update your configuration to remove this option.'
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
from backup import FileBackend
|
from backup import FileBackend
|
||||||
from flaky import flaky
|
from flaky import flaky
|
||||||
from pyln.client import RpcError
|
from pyln.testing.fixtures import * # noqa: F401,F403
|
||||||
from pyln.testing.fixtures import *
|
|
||||||
from pyln.client import RpcError
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -15,6 +13,7 @@ cli_path = os.path.join(os.path.dirname(__file__), "backup-cli")
|
|||||||
# For the transition period we require deprecated_apis to be true
|
# For the transition period we require deprecated_apis to be true
|
||||||
deprecated_apis = True
|
deprecated_apis = True
|
||||||
|
|
||||||
|
|
||||||
def test_start(node_factory, directory):
|
def test_start(node_factory, directory):
|
||||||
bpath = os.path.join(directory, 'lightning-1', 'regtest')
|
bpath = os.path.join(directory, 'lightning-1', 'regtest')
|
||||||
bdest = 'file://' + os.path.join(bpath, 'backup.dbak')
|
bdest = 'file://' + os.path.join(bpath, 'backup.dbak')
|
||||||
@@ -39,7 +38,6 @@ def test_start_no_init(node_factory, directory):
|
|||||||
"""The plugin should refuse to start if we haven't initialized the backup
|
"""The plugin should refuse to start if we haven't initialized the backup
|
||||||
"""
|
"""
|
||||||
bpath = os.path.join(directory, 'lightning-1', 'regtest')
|
bpath = os.path.join(directory, 'lightning-1', 'regtest')
|
||||||
bdest = 'file://' + os.path.join(bpath, 'backup.dbak')
|
|
||||||
os.makedirs(bpath)
|
os.makedirs(bpath)
|
||||||
opts = {
|
opts = {
|
||||||
'plugin': plugin_path,
|
'plugin': plugin_path,
|
||||||
@@ -128,7 +126,7 @@ def test_failing_restore(node_factory, directory):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def section(comment):
|
def section(comment):
|
||||||
print("="*25, comment, "="*25)
|
print("=" * 25, comment, "=" * 25)
|
||||||
|
|
||||||
section("Starting node for the first time")
|
section("Starting node for the first time")
|
||||||
l1 = node_factory.get_node(options=opts, cleandir=False, may_fail=True)
|
l1 = node_factory.get_node(options=opts, cleandir=False, may_fail=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user