mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-27 20:49:10 +02:00
Merge bitcoin/bitcoin#32219: test: enabling wallet migration functional test on windows
941b8f54c0
ci: run get_previous_releases as part of test cross win job (Max Edwards)5e2182140b
test: increment mocked time for migrating wallet backups (Max Edwards)5174565802
ci: disable feature_unsupported_utxo_db functional test (Max Edwards)3dc90d69a6
test: remove mempool.dat before copying (Max Edwards)67a6b20d50
test: add windows support to get previous releases script (Max Edwards)1a1b478ca3
scripted-diff: rename tarball to archive (Max Edwards)4f06dc8484
test: remove building from source from get prev releases script (Max Edwards) Pull request description: This PR updates the `test/get_previous_releases.py` script to also work on Windows by changing to be pure python rather than using unix tools such as `curl` and `tar`. This enables additional functional tests to run such as `wallet_migration.py`, `mempool_compatability.py` and `wallet_backwards_compatibility.py`. Unfortunately `feature_unsupported_utxo_db.py` _could_ run but this test requires Bitcoin `v0.14.3` which will not run under windows with emojis in the data directory (as the functional test runner has by default) . This test could be run as it's own step in the ci workflow file and would pass but as it's quite an old version / feature I have assumed it's not worth worrying about and best just to exclude. Two tests needed to be slightly modified to run under windows. Both were issues with trying to overwrite a file that already exists which windows seems to be more strict on than the unix based systems. Finally, building from source has been dropped from the `get_previous_releases.py` script. This had not been updated after the move to cmake and so it was assumed that nobody could have been using that feature. ACKs for top commit: maflcko: re-ACK941b8f54c0
🍪 achow101: ACK941b8f54c0
hodlinator: re-ACK941b8f54c0
Tree-SHA512: 22933d0ec278b9b0ffcd2a8e90026e1a3631b00186e7f78bd65be925049021e319367d488c36a82ab526a07b264bac18c2777f87ca1174b231ed49fed56d11cb
This commit is contained in:
@@ -56,6 +56,7 @@ class MempoolCompatibilityTest(BitcoinTestFramework):
|
||||
self.log.info("Move mempool.dat from old to new node")
|
||||
old_node_mempool = old_node.chain_path / "mempool.dat"
|
||||
new_node_mempool = new_node.chain_path / "mempool.dat"
|
||||
new_node_mempool.unlink()
|
||||
old_node_mempool.rename(new_node_mempool)
|
||||
|
||||
self.log.info("Start new node and verify mempool contains the tx")
|
||||
|
@@ -555,7 +555,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
bins_missing = True
|
||||
if bins_missing:
|
||||
raise AssertionError("At least one release binary is missing. "
|
||||
"Previous releases binaries can be downloaded via `test/get_previous_releases.py -b`.")
|
||||
"Previous releases binaries can be downloaded via `test/get_previous_releases.py`.")
|
||||
assert_equal(len(extra_confs), num_nodes)
|
||||
assert_equal(len(extra_args), num_nodes)
|
||||
assert_equal(len(versions), num_nodes)
|
||||
|
@@ -490,11 +490,16 @@ class WalletMigrationTest(BitcoinTestFramework):
|
||||
|
||||
# Use self.migrate_and_get_rpc to test this error to get everything copied over to the master node
|
||||
assert_raises_rpc_error(-4, "Error: Wallet decryption failed, the wallet passphrase was not provided or was incorrect", self.migrate_and_get_rpc, "encrypted")
|
||||
|
||||
# Use the RPC directly on the master node for the rest of these checks
|
||||
self.master_node.bumpmocktime(1) # Prevents filename duplication on wallet backups which is a problem on Windows
|
||||
assert_raises_rpc_error(-4, "Error: Wallet decryption failed, the wallet passphrase was not provided or was incorrect", self.master_node.migratewallet, "encrypted", "badpass")
|
||||
|
||||
self.master_node.bumpmocktime(1) # Prevents filename duplication on wallet backups which is a problem on Windows
|
||||
assert_raises_rpc_error(-4, "The passphrase contains a null character", self.master_node.migratewallet, "encrypted", "pass\0with\0null")
|
||||
|
||||
# Verify we can properly migrate the encrypted wallet
|
||||
self.master_node.bumpmocktime(1) # Prevents filename duplication on wallet backups which is a problem on Windows
|
||||
self.master_node.migratewallet("encrypted", passphrase="pass")
|
||||
wallet = self.master_node.get_wallet_rpc("encrypted")
|
||||
|
||||
|
Reference in New Issue
Block a user