diff --git a/api_auth_docker/tests/test-gatekeeper.sh b/api_auth_docker/tests/test-gatekeeper.sh index abb9b1b..1c58f45 100755 --- a/api_auth_docker/tests/test-gatekeeper.sh +++ b/api_auth_docker/tests/test-gatekeeper.sh @@ -17,7 +17,7 @@ # action_installation_info=stats # action_getmempoolinfo=stats # action_getblockhash=stats -# +# # # Watcher can do what the stats can do, plus: # action_watch=watcher # action_unwatch=watcher @@ -47,7 +47,7 @@ # action_ln_listpays=watcher # action_ln_paystatus=watcher # action_bitcoin_estimatesmartfee=watcher -# +# # # Spender can do what the watcher can do, plus: # action_get_txns_spending=spender # action_getbalance=spender @@ -78,10 +78,10 @@ # action_listbatchers=spender # action_getbatcher=spender # action_getbatchdetails=spender -# +# # # Admin can do what the spender can do, plus: -# -# +# +# # # Should be called from inside the Docker network only: # action_conf=internal # action_newblock=internal @@ -558,7 +558,7 @@ exec_in_test_container_leave_lf apk add --update curl coreutils openssl # Copy keys to test container trace 1 "\n\n[test_gatekeeper] ${BCyan}Copying keys and certs to test container...${Color_Off}\n" -gatekeeperid=$(docker ps -q -f "name=cyphernode_gatekeeper") +gatekeeperid=$(docker ps -q -f "name=cyphernode.gatekeeper") testid=$(docker ps -q -f "name=tests-gatekeeper") docker cp ${gatekeeperid}:/etc/nginx/conf.d/keys.properties - | docker cp - ${testid}:/ docker cp ${gatekeeperid}:/etc/ssl/certs/cert.pem - | docker cp - ${testid}:/ diff --git a/proxy_docker/app/tests/mine.sh b/proxy_docker/app/tests/mine.sh index 90991de..1abfebd 100755 --- a/proxy_docker/app/tests/mine.sh +++ b/proxy_docker/app/tests/mine.sh @@ -10,9 +10,9 @@ mine() { local minedaddr echo ; echo "About to mine ${nbblocks} block(s)..." - minedaddr=$(docker exec -t $(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 -t $(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 diff --git a/proxy_docker/app/tests/test-manage-missed.sh b/proxy_docker/app/tests/test-manage-missed.sh index a1ed886..56292d9 100755 --- a/proxy_docker/app/tests/test-manage-missed.sh +++ b/proxy_docker/app/tests/test-manage-missed.sh @@ -73,10 +73,12 @@ test_manage_missed_0_conf() { trace 3 "[test_manage_missed_0_conf] response=${response}" trace 3 "[test_manage_missed_0_conf] Shutting down the proxy..." - docker stop $(docker ps -q -f "name=proxy\.") + # There are two container names containing "proxy": proxy and proxycron + # Let's exclude proxycron + docker restart $(docker ps -q -f "name=proxy[^c]") trace 3 "[test_manage_missed_0_conf] Sending coins to watched address while proxy is down..." - docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address} 0.0001 + docker exec -it $(docker ps -q -f "name=cyphernode.bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address} 0.0001 # txid1=$(exec_in_test_container curl -d '{"address":"'${address}'","amount":0.0001}' proxy:8888/spend | jq -r ".txid") wait_for_proxy @@ -113,14 +115,16 @@ test_manage_missed_1_conf() { trace 3 "[test_manage_missed_1_conf] response=${response}" trace 3 "[test_manage_missed_1_conf] Sending coins to watched address while proxy is up..." - docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address} 0.0001 + docker exec -it $(docker ps -q -f "name=cyphernode.bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address} 0.0001 # txid1=$(exec_in_test_container curl -d '{"address":"'${address}'","amount":0.0001}' proxy:8888/spend | jq -r ".txid") trace 3 "[test_manage_missed_1_conf] Sleeping for 20 seconds to let the 0-conf callbacks to happen..." sleep 20 trace 3 "[test_manage_missed_1_conf] Shutting down the proxy..." - docker stop $(docker ps -q -f "name=proxy\.") + # There are two container names containing "proxy": proxy and proxycron + # Let's exclude proxycron + docker restart $(docker ps -q -f "name=proxy[^c]") trace 3 "[test_manage_missed_1_conf] Mine a new block..." mine diff --git a/proxy_docker/app/tests/test-watches.sh b/proxy_docker/app/tests/test-watches.sh index db32da9..5e6993e 100755 --- a/proxy_docker/app/tests/test-watches.sh +++ b/proxy_docker/app/tests/test-watches.sh @@ -176,7 +176,7 @@ test_watches() { trace 2 "\n\n[test_watches] ${BCyan}10. Send coins to address1...${Color_Off}\n" start_callback_server 1111 # Let's use the bitcoin node directly to better simulate an external spend - txid=$(docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address1} 0.0001 | tr -d "\r\n") + txid=$(docker exec -it $(docker ps -q -f "name=cyphernode.bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address1} 0.0001 | tr -d "\r\n") # txid=$(exec_in_test_container curl -d '{"address":"'${address1}'","amount":0.001}' proxy:8888/spend | jq -r ".txid") trace 3 "[test_watches] txid=${txid}" trace 3 "[test_watches] Waiting for 0-conf callback on address1..." diff --git a/proxy_docker/app/tests/test-watchpub32.sh b/proxy_docker/app/tests/test-watchpub32.sh index b9a7e17..f98bcfe 100755 --- a/proxy_docker/app/tests/test-watchpub32.sh +++ b/proxy_docker/app/tests/test-watchpub32.sh @@ -272,7 +272,7 @@ test_watch_pub32() { trace 2 "\n\n[test_watch_pub32] ${BCyan}12. Send coins to address1...${Color_Off}\n" start_callback_server 1111 # Let's use the bitcoin node directly to better simulate an external spend - txid1=$(docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address1} 0.0001 | tr -d "\r\n") + txid1=$(docker exec -it $(docker ps -q -f "name=cyphernode.bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address1} 0.0001 | tr -d "\r\n") # txid1=$(exec_in_test_container curl -d '{"address":"'${address1}'","amount":0.001}' proxy:8888/spend | jq -r ".txid") trace 3 "[test_watch_pub32] txid1=${txid1}" trace 3 "[test_watch_pub32] Waiting for 0-conf callback on address1..." @@ -282,7 +282,7 @@ test_watch_pub32() { trace 2 "\n\n[test_watch_pub32] ${BCyan}13. Send coins to address2...${Color_Off}\n" start_callback_server 1113 # Let's use the bitcoin node directly to better simulate an external spend - txid2=$(docker exec -it $(docker ps -q -f "name=cyphernode_bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address2} 0.0001 | tr -d "\r\n") + txid2=$(docker exec -it $(docker ps -q -f "name=cyphernode.bitcoin") bitcoin-cli -rpcwallet=spending01.dat sendtoaddress ${address2} 0.0001 | tr -d "\r\n") # txid2=$(exec_in_test_container curl -d '{"address":"'${address2}'","amount":0.001}' proxy:8888/spend | jq -r ".txid") trace 3 "[test_watch_pub32] txid2=${txid2}" trace 3 "[test_watch_pub32] Waiting for 0-conf callback on address2..."