From adcc2d2adac0494570bd1e5c6061338d9656785e Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Tue, 26 Mar 2019 10:53:57 -0400 Subject: [PATCH] Re-enable no wallet functional tests --- .travis.yml | 1 - test/functional/feature_assetsdir.py | 3 +++ test/functional/feature_block_subsidy.py | 3 +++ test/functional/feature_block_v4.py | 3 +++ test/functional/feature_blocksign.py | 4 ++++ test/functional/feature_confidential_transactions.py | 3 +++ test/functional/feature_connect_coinbase.py | 3 +++ test/functional/feature_default_asset_name.py | 3 +++ test/functional/feature_fedpeg.py | 3 +++ test/functional/feature_initial_reissuance_token.py | 3 +++ test/functional/feature_issuance.py | 3 +++ test/functional/feature_mandatory_coinbase.py | 3 +++ test/functional/feature_pak.py | 3 +++ test/functional/feature_progress.py | 3 +++ test/functional/feature_txwitness.py | 3 +++ test/functional/rpc_tweakfedpeg.py | 3 +++ 16 files changed, 46 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ab7536c410..eed2515e86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,7 +137,6 @@ jobs: DEP_OPTS="NO_WALLET=1 NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports" - RUN_FUNCTIONAL_TESTS=false # Cross-Mac - stage: test env: >- diff --git a/test/functional/feature_assetsdir.py b/test/functional/feature_assetsdir.py index 4510914889..1312802756 100755 --- a/test/functional/feature_assetsdir.py +++ b/test/functional/feature_assetsdir.py @@ -22,6 +22,9 @@ def set_test_params(self): self.num_nodes = 1 [["-initialfreecoins=2100000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0"]] + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def setup_network(self, split=False): self.setup_nodes() diff --git a/test/functional/feature_block_subsidy.py b/test/functional/feature_block_subsidy.py index 852a923da2..1599a52293 100755 --- a/test/functional/feature_block_subsidy.py +++ b/test/functional/feature_block_subsidy.py @@ -29,6 +29,9 @@ def set_test_params(self): # 10 satoshi block subsidy at start for one node, none for other self.extra_args = [["-con_blocksubsidy=10"], ["-con_blocksubsidy=0", "-txindex=1"]] + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): # Block will have 10 satoshi output, node 1 will ban diff --git a/test/functional/feature_block_v4.py b/test/functional/feature_block_v4.py index d3db6a136d..6f83fa5760 100755 --- a/test/functional/feature_block_v4.py +++ b/test/functional/feature_block_v4.py @@ -18,6 +18,9 @@ def set_test_params(self): self.extra_args = [['-whitelist=127.0.0.1', '-con_bip34height=0', '-con_bip65height=0', '-con_bip66height=0', '-con_csv_deploy_start=-1']] self.setup_clean_chain = True + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): # First, quick check that CSV is ACTIVE at genesis diff --git a/test/functional/feature_blocksign.py b/test/functional/feature_blocksign.py index 260892dfd9..e678f020c3 100755 --- a/test/functional/feature_blocksign.py +++ b/test/functional/feature_blocksign.py @@ -46,6 +46,10 @@ class BlockSignTest(BitcoinTestFramework): As well as syncing blocks over p2p """ + + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + # Dynamically generate N keys to be used for block signing. def init_keys(self, num_keys): self.keys = [] diff --git a/test/functional/feature_confidential_transactions.py b/test/functional/feature_confidential_transactions.py index 1c1d77a101..b51cafe297 100755 --- a/test/functional/feature_confidential_transactions.py +++ b/test/functional/feature_confidential_transactions.py @@ -25,6 +25,9 @@ def setup_network(self, split=False): self.is_network_split = False self.sync_all() + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): print("General Confidential tests") diff --git a/test/functional/feature_connect_coinbase.py b/test/functional/feature_connect_coinbase.py index 6e168006fe..03a8f02a4a 100755 --- a/test/functional/feature_connect_coinbase.py +++ b/test/functional/feature_connect_coinbase.py @@ -19,6 +19,9 @@ def set_test_params(self): self.extra_args = [["-con_connect_coinbase=0", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN)], ["-con_connect_coinbase=1", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN), '-anyonecanspendaremine=1']] + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): # Same genesis block assert_equal(self.nodes[0].getblockhash(0), self.nodes[1].getblockhash(0)) diff --git a/test/functional/feature_default_asset_name.py b/test/functional/feature_default_asset_name.py index 7e772f3c1f..860c4368f2 100755 --- a/test/functional/feature_default_asset_name.py +++ b/test/functional/feature_default_asset_name.py @@ -29,6 +29,9 @@ def setup_network(self, split=False): self.is_network_split = False self.sync_all() + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): #Claim all anyone-can-spend coins and test that calling sendtoaddress without providing the assetlabel parameter results in the specified default pegged asset being sent. self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 21000000, "", "", True) diff --git a/test/functional/feature_fedpeg.py b/test/functional/feature_fedpeg.py index d29e9a2210..4aa7fb8734 100755 --- a/test/functional/feature_fedpeg.py +++ b/test/functional/feature_fedpeg.py @@ -32,6 +32,9 @@ def add_options(self, parser): parser.add_argument("--parent_bitcoin", dest="parent_bitcoin", default=False, action="store_true", help="Parent nodes are Bitcoin") + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def setup_network(self, split=False): if self.options.parent_bitcoin and self.options.parent_binpath == "": raise Exception("Can't run with --parent_bitcoin without specifying --parent_binpath") diff --git a/test/functional/feature_initial_reissuance_token.py b/test/functional/feature_initial_reissuance_token.py index 7b1336217c..aa791c82fc 100755 --- a/test/functional/feature_initial_reissuance_token.py +++ b/test/functional/feature_initial_reissuance_token.py @@ -23,6 +23,9 @@ def set_test_params(self): #Set number of initial reissuance tokens and also set initial free coins less than max so we can reissue more later self.extra_args = [["-initialreissuancetokens=200000000", "-initialfreecoins=2000000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0", "-blindedaddresses=1"]]*2 + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def setup_network(self, split=False): self.setup_nodes() connect_nodes_bi(self.nodes, 0, 1) diff --git a/test/functional/feature_issuance.py b/test/functional/feature_issuance.py index 7ffe8641f0..98065e96c5 100755 --- a/test/functional/feature_issuance.py +++ b/test/functional/feature_issuance.py @@ -94,6 +94,9 @@ def set_test_params(self): self.extra_args = [["-blindedaddresses=1"]] * self.num_nodes self.setup_clean_chain = True + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def setup_network(self, split=False): self.setup_nodes() connect_nodes_bi(self.nodes, 0, 1) diff --git a/test/functional/feature_mandatory_coinbase.py b/test/functional/feature_mandatory_coinbase.py index 3c2cce30ab..35c6f92a9c 100755 --- a/test/functional/feature_mandatory_coinbase.py +++ b/test/functional/feature_mandatory_coinbase.py @@ -33,6 +33,9 @@ def set_test_params(self): # Non-zero coinbase outputs *must* match this. Not setting it means anything is allowed self.extra_args = [["-con_mandatorycoinbase="+mandatory_script], []] + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): node0 = self.nodes[0] node1 = self.nodes[1] diff --git a/test/functional/feature_pak.py b/test/functional/feature_pak.py index 6b19ab0aa6..2e0e83bdc7 100755 --- a/test/functional/feature_pak.py +++ b/test/functional/feature_pak.py @@ -49,6 +49,9 @@ def set_test_params(self): self.extra_args[i_pak1] = self.extra_args[i_pak1] + pak_to_option(pak1) self.extra_args[i_pak2] = self.extra_args[i_pak2] + pak_to_option(pak2) + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): # Give novalidate 50 BTC diff --git a/test/functional/feature_progress.py b/test/functional/feature_progress.py index 02a0e774cd..3c565110c4 100755 --- a/test/functional/feature_progress.py +++ b/test/functional/feature_progress.py @@ -23,6 +23,9 @@ def set_test_params(self): self.num_nodes = 2 self.extra_args = [["-debug", "-con_npowtargetspacing=1", "-maxtimeadjustment=0"]] * self.num_nodes + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def setup_network(self): self.setup_nodes() self.is_network_split = True diff --git a/test/functional/feature_txwitness.py b/test/functional/feature_txwitness.py index 12e04e3795..a74f12870e 100755 --- a/test/functional/feature_txwitness.py +++ b/test/functional/feature_txwitness.py @@ -26,6 +26,9 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def assert_tx_format_also_signed(self, utxo, segwit): raw = self.nodes[0].createrawtransaction( [{"txid": utxo["txid"], "vout": utxo["vout"]}], diff --git a/test/functional/rpc_tweakfedpeg.py b/test/functional/rpc_tweakfedpeg.py index 4d54bcfbd9..333fa5b13e 100755 --- a/test/functional/rpc_tweakfedpeg.py +++ b/test/functional/rpc_tweakfedpeg.py @@ -28,6 +28,9 @@ def set_test_params(self): def setup_network(self): self.setup_nodes() + def skip_test_if_missing_module(self): + self.skip_if_no_wallet() + def run_test(self): # Test that OP_TRUE mainchain_addr/claim_script never changes assert_equal(self.nodes[0].getsidechaininfo()["fedpegscript"], OP_TRUE_SCRIPT)