mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-18 21:25:06 +01:00
Unimportant stuff in the tests
This commit is contained in:
@@ -10,9 +10,9 @@ mine() {
|
|||||||
local minedaddr
|
local minedaddr
|
||||||
|
|
||||||
echo ; echo "About to mine ${nbblocks} block(s)..."
|
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}"
|
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
|
case "${0}" in *mine.sh) mine $@;; esac
|
||||||
|
|||||||
@@ -47,14 +47,18 @@ trace() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_test_container() {
|
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() {
|
stop_test_container() {
|
||||||
trace 1 "\n\n[stop_test_container] ${BCyan}Stopping existing containers if they are running...${Color_Off}\n"
|
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
|
||||||
docker stop tests-batching-cb
|
# 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() {
|
exec_in_test_container() {
|
||||||
|
|||||||
@@ -21,17 +21,21 @@ trace() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_test_container() {
|
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() {
|
stop_test_container() {
|
||||||
trace 1 "\n\n[stop_test_container] ${BCyan}Stopping existing containers if they are running...${Color_Off}\n"
|
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() {
|
exec_in_test_container() {
|
||||||
docker exec -it test-derive "$@"
|
docker exec -it tests-derive "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
tests_derive() {
|
tests_derive() {
|
||||||
|
|||||||
@@ -21,11 +21,17 @@ trace() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_test_container() {
|
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() {
|
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() {
|
exec_in_test_container() {
|
||||||
|
|||||||
@@ -27,14 +27,18 @@ trace() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_test_container() {
|
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() {
|
stop_test_container() {
|
||||||
trace 1 "\n\n[stop_test_container] ${BCyan}Stopping existing containers if they are running...${Color_Off}\n"
|
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
|
||||||
docker stop tests-watch-pub32-cb
|
# 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() {
|
exec_in_test_container() {
|
||||||
|
|||||||
Reference in New Issue
Block a user