From 08289c9e1a0b2749e2bebab8dbefd7a1fab525fc Mon Sep 17 00:00:00 2001 From: kexkey Date: Thu, 5 Sep 2019 11:10:17 -0400 Subject: [PATCH] Added Bitcoin Core wait time in the deployment tests --- .../templates/installer/testdeployment.sh | 1 + cyphernodeconf_docker/templates/installer/testfeatures.sh | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cyphernodeconf_docker/templates/installer/testdeployment.sh b/cyphernodeconf_docker/templates/installer/testdeployment.sh index 1e42a54..94dde14 100644 --- a/cyphernodeconf_docker/templates/installer/testdeployment.sh +++ b/cyphernodeconf_docker/templates/installer/testdeployment.sh @@ -63,6 +63,7 @@ esac docker run --rm -it -v $current_path/testfeatures.sh:/testfeatures.sh \ -v <%= gatekeeper_datapath %>:/gatekeeper \ -v $current_path:/dist \ +-v cyphernode_bitcoin_monitor:/bitcoin_monitor:ro \ --network cyphernodenet eclipse-mosquitto:1.6.2 /testfeatures.sh if [ -f $current_path/exitStatus.sh ]; then diff --git a/cyphernodeconf_docker/templates/installer/testfeatures.sh b/cyphernodeconf_docker/templates/installer/testfeatures.sh index fd110fa..037e3f0 100644 --- a/cyphernodeconf_docker/templates/installer/testfeatures.sh +++ b/cyphernodeconf_docker/templates/installer/testfeatures.sh @@ -349,11 +349,11 @@ fi finalreturncode=$((${returncode} | ${finalreturncode})) result="${result}$(feature_status ${returncode} 'Pycoin error!')}" +<% if (features.indexOf('otsclient') != -1) { %> ############################# # OTSCLIENT # ############################# -<% if (features.indexOf('otsclient') != -1) { %> result="${result},{\"coreFeature\":false, \"name\":\"otsclient\",\"working\":" status=$(echo "{${containers}}" | jq ".containers[] | select(.name == \"otsclient\") | .active") if [[ "${workingproxy}" = "true" && "${status}" = "true" ]]; then @@ -370,6 +370,9 @@ result="${result}$(feature_status ${returncode} 'OTSclient error!')}" # BITCOIN # ############################# +echo -e "\r\n\e[1;36mWaiting for Bitcoin Core to be ready... " > /dev/console +timeout_feature '[ -f "/bitcoin_monitor/up" ]' + result="${result},{\"coreFeature\":true, \"name\":\"bitcoin\",\"working\":" status=$(echo "{${containers}}" | jq ".containers[] | select(.name == \"bitcoin\") | .active") if [[ "${workingproxy}" = "true" && "${status}" = "true" ]]; then @@ -381,11 +384,11 @@ fi finalreturncode=$((${returncode} | ${finalreturncode})) result="${result}$(feature_status ${returncode} 'Bitcoin error!')}" +<% if (features.indexOf('lightning') != -1) { %> ############################# # LIGHTNING # ############################# -<% if (features.indexOf('lightning') != -1) { %> result="${result},{\"coreFeature\":false, \"name\":\"lightning\",\"working\":" status=$(echo "{${containers}}" | jq ".containers[] | select(.name == \"lightning\") | .active") if [[ "${workingproxy}" = "true" && "${status}" = "true" ]]; then