Unimportant stuff in the tests

This commit is contained in:
kexkey
2021-11-18 12:11:32 -05:00
parent 3b854691b2
commit 2e2f5329a7
5 changed files with 31 additions and 13 deletions

View File

@@ -10,9 +10,9 @@ mine() {
local minedaddr
echo ; echo "About to mine ${nbblocks} block(s)..."
minedaddr=$(docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat getnewaddress | tr -d '\r')
minedaddr=$(docker exec -t $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat getnewaddress | tr -d '\r')
echo ; echo "minedaddr=${minedaddr}"
docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat generatetoaddress ${nbblocks} "${minedaddr}"
docker exec -t $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat generatetoaddress ${nbblocks} "${minedaddr}"
}
case "${0}" in *mine.sh) mine $@;; esac

View File

@@ -47,14 +47,18 @@ trace() {
}
start_test_container() {
docker run -d --rm -it --name tests-batching --network=cyphernodenet alpine
docker run -d --rm -t --name tests-batching --network=cyphernodenet alpine
}
stop_test_container() {
trace 1 "\n\n[stop_test_container] ${BCyan}Stopping existing containers if they are running...${Color_Off}\n"
docker stop tests-batching
docker stop tests-batching-cb
# docker stop tests-batching
# docker stop tests-batching-cb
local containers=$(docker ps -q -f "name=tests-batching")
if [ -n "${containers}" ]; then
docker stop ${containers}
fi
}
exec_in_test_container() {

View File

@@ -21,17 +21,21 @@ trace() {
}
start_test_container() {
docker run -d --rm -it --name test-derive --network=cyphernodenet alpine
docker run -d --rm -t --name tests-derive --network=cyphernodenet alpine
}
stop_test_container() {
trace 1 "\n\n[stop_test_container] ${BCyan}Stopping existing containers if they are running...${Color_Off}\n"
docker stop test-derive
# docker stop test-derive
local containers=$(docker ps -q -f "name=tests-derive")
if [ -n "${containers}" ]; then
docker stop ${containers}
fi
}
exec_in_test_container() {
docker exec -it test-derive "$@"
docker exec -it tests-derive "$@"
}
tests_derive() {

View File

@@ -21,11 +21,17 @@ trace() {
}
start_test_container() {
docker run -d --rm -it --name tests-manage-missed --network=cyphernodenet alpine
docker run -d --rm -t --name tests-manage-missed --network=cyphernodenet alpine
}
stop_test_container() {
docker stop tests-manage-missed
trace 1 "\n\n[stop_test_container] ${BCyan}Stopping existing containers if they are running...${Color_Off}\n"
# docker stop tests-manage-missed
local containers=$(docker ps -q -f "name=tests-manage-missed")
if [ -n "${containers}" ]; then
docker stop ${containers}
fi
}
exec_in_test_container() {

View File

@@ -27,14 +27,18 @@ trace() {
}
start_test_container() {
docker run -d --rm -it --name tests-watch-pub32 --network=cyphernodenet alpine
docker run -d --rm -t --name tests-watch-pub32 --network=cyphernodenet alpine
}
stop_test_container() {
trace 1 "\n\n[stop_test_container] ${BCyan}Stopping existing containers if they are running...${Color_Off}\n"
docker stop tests-watch-pub32
docker stop tests-watch-pub32-cb
# docker stop tests-watch-pub32
# docker stop tests-watch-pub32-cb
local containers=$(docker ps -q -f "name=tests-watch-pub32")
if [ -n "${containers}" ]; then
docker stop ${containers}
fi
}
exec_in_test_container() {