mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-19 14:14:20 +01:00
backup: Add a warning about the deprecated backup-destination flag
This commit is contained in:
@@ -189,3 +189,21 @@ def test_restore(node_factory, directory):
|
||||
|
||||
rdest = os.path.join(bpath, 'lightningd.sqlite.restore')
|
||||
subprocess.check_call([cli_path, "restore", bdest, rdest])
|
||||
|
||||
|
||||
def test_warning(directory, node_factory):
|
||||
bpath = os.path.join(directory, 'lightning-1', 'regtest')
|
||||
bdest = 'file://' + os.path.join(bpath, 'backup.dbak')
|
||||
os.makedirs(bpath)
|
||||
subprocess.check_call([cli_path, "init", bpath, bdest])
|
||||
opts = {
|
||||
'plugin': plugin_path,
|
||||
'allow-deprecated-apis': deprecated_apis,
|
||||
'backup-destination': 'somewhere/over/the/rainbox',
|
||||
}
|
||||
l1 = node_factory.get_node(options=opts, cleandir=False)
|
||||
l1.stop()
|
||||
|
||||
assert(l1.daemon.is_in_log(
|
||||
r'The `--backup-destination` option is deprecated and will be removed in future versions of the backup plugin.'
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user