Skip to content

Commit 384007a

Browse files
committed
Run RPC tests with explicitly defined datadir
When there is a also a configuration file in the standard datadir, using the CLI still works, but it can result in warnings like: Error: Invalid combination of -regtest and -testnet.
1 parent 41f0aa5 commit 384007a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

qa/pull-tester/omnicore-rpc-tests.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ echo "Omni Core RPC test dir: "$TESTDIR
2020
echo "Last OmniJ commit: "$(git log -n 1 --format="%H Author: %cn <%ce>")
2121
if [ "$@" = "true" ]; then
2222
echo "Debug logging level: maximum"
23-
$OMNICORED -regtest -txindex -server -daemon -rpcuser=bitcoinrpc -rpcpassword=pass -debug=1 -omnidebug=all -omnialertallowsender=any -omniactivationallowsender=any -paytxfee=0.0001 -minrelaytxfee=0.00001 -limitancestorcount=750 -limitdescendantcount=750 -rpcserialversion=0 -discover=0 -listen=0 -datadir="$DATADIR" &
23+
$OMNICORED -datadir="$DATADIR" -regtest -txindex -server -daemon -rpcuser=bitcoinrpc -rpcpassword=pass -debug=1 -omnidebug=all -omnialertallowsender=any -omniactivationallowsender=any -paytxfee=0.0001 -minrelaytxfee=0.00001 -limitancestorcount=750 -limitdescendantcount=750 -rpcserialversion=0 -discover=0 -listen=0 &
2424
else
2525
echo "Debug logging level: minimum"
26-
$OMNICORED -regtest -txindex -server -daemon -rpcuser=bitcoinrpc -rpcpassword=pass -debug=0 -omnidebug=none -omnialertallowsender=any -omniactivationallowsender=any -paytxfee=0.0001 -minrelaytxfee=0.00001 -limitancestorcount=750 -limitdescendantcount=750 -rpcserialversion=0 -discover=0 -listen=0 -datadir="$DATADIR" &
26+
$OMNICORED -datadir="$DATADIR" -regtest -txindex -server -daemon -rpcuser=bitcoinrpc -rpcpassword=pass -debug=0 -omnidebug=none -omnialertallowsender=any -omniactivationallowsender=any -paytxfee=0.0001 -minrelaytxfee=0.00001 -limitancestorcount=750 -limitdescendantcount=750 -rpcserialversion=0 -discover=0 -listen=0 &
2727
fi
28-
$OMNICORECLI -regtest -rpcuser=bitcoinrpc -rpcpassword=pass -rpcwait getinfo
29-
$OMNICORECLI -regtest -rpcuser=bitcoinrpc -rpcpassword=pass -rpcwait omni_getinfo
28+
$OMNICORECLI -datadir="$DATADIR" -regtest -rpcuser=bitcoinrpc -rpcpassword=pass -rpcwait getinfo
29+
$OMNICORECLI -datadir="$DATADIR" -regtest -rpcuser=bitcoinrpc -rpcpassword=pass -rpcwait omni_getinfo
3030
./gradlew --console plain :omnij-rpc:regTest
3131
STATUS=$?
32-
$OMNICORECLI -regtest -rpcuser=bitcoinrpc -rpcpassword=pass -rpcwait stop
32+
$OMNICORECLI -datadir="$DATADIR" -regtest -rpcuser=bitcoinrpc -rpcpassword=pass -rpcwait stop
3333

3434
# If $STATUS is not 0, the test failed.
35-
if [ $STATUS -ne 0 ]; then tail -500 $DATADIR/regtest/omnicore.log; fi
35+
if [ $STATUS -ne 0 ]; then tail -100 $DATADIR/regtest/omnicore.log; fi
3636

3737

3838
exit $STATUS

0 commit comments

Comments
 (0)