mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-19 14:14:20 +01:00
datastore: don't fail upgrade test if lightningd has real datastore.
Reported-by: @cdecker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
125b2c650d
commit
1612447c09
@@ -132,6 +132,10 @@ def test_upgrade(node_factory):
|
||||
except RpcError:
|
||||
pass
|
||||
|
||||
# There's no upgrade if there's a real datastore.
|
||||
if l1.daemon.is_in_log('there is a real datastore command'):
|
||||
return
|
||||
|
||||
l1.daemon.wait_for_log('Upgrading store to have generation numbers')
|
||||
wait_for(lambda: not os.path.exists(os.path.join(l1.daemon.lightning_dir,
|
||||
'regtest',
|
||||
@@ -159,7 +163,7 @@ def test_datastore_keylist(node_factory):
|
||||
|
||||
# Cannot add child to existing!
|
||||
l1.rpc.datastore(key='a', string='aval')
|
||||
with pytest.raises(RpcError, match='1206.*Parent key \[a\] exists'):
|
||||
with pytest.raises(RpcError, match=r'1206.*Parent key \[a\] exists'):
|
||||
l1.rpc.datastore(key=['a', 'b'], string='abval',
|
||||
mode='create-or-replace')
|
||||
# Listing subkey gives DNE.
|
||||
|
||||
Reference in New Issue
Block a user