Re-enable no wallet functional tests

This commit is contained in:
Gregory Sanders 2019-03-26 10:53:57 -04:00
parent 712fad0254
commit adcc2d2ada
16 changed files with 46 additions and 1 deletions

View file

@ -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: >-

View file

@ -22,6 +22,9 @@ class AssetdirTests(BitcoinTestFramework):
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()

View file

@ -29,6 +29,9 @@ class BlockSubsidyTest(BitcoinTestFramework):
# 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

View file

@ -18,6 +18,9 @@ class BlockV4Test(BitcoinTestFramework):
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

View file

@ -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 = []

View file

@ -25,6 +25,9 @@ class CTTest (BitcoinTestFramework):
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")

View file

@ -19,6 +19,9 @@ class ConnectGenesisTest(BitcoinTestFramework):
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))

View file

@ -29,6 +29,9 @@ class NamedDefaultAssetTest(BitcoinTestFramework):
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)

View file

@ -32,6 +32,9 @@ class FedPegTest(BitcoinTestFramework):
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")

View file

@ -23,6 +23,9 @@ class InitialReissuanceTokenTest(BitcoinTestFramework):
#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)

View file

@ -94,6 +94,9 @@ class IssuanceTest(BitcoinTestFramework):
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)

View file

@ -33,6 +33,9 @@ class MandatoryCoinbaseTest(BitcoinTestFramework):
# 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]

View file

@ -49,6 +49,9 @@ class PAKTest (BitcoinTestFramework):
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

View file

@ -23,6 +23,9 @@ class ProgressTest(BitcoinTestFramework):
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

View file

@ -26,6 +26,9 @@ class TxWitnessTest(BitcoinTestFramework):
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"]}],

View file

@ -28,6 +28,9 @@ class TweakFedpegTest(BitcoinTestFramework):
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)