[test/deploy] Fix possible dependency missmatch for tests

pull/1852/head
Daniel Van Der Maden 5 years ago
parent 2caecd4148
commit 1ca65b1176
  1. 32
      test/deploy.sh

@ -60,22 +60,32 @@ function cleanup_and_result() {
} }
function debug_staking() { function debug_staking() {
hmy_one_dir="$(go env GOPATH)/src/github.com/harmony-one" source "$(go env GOPATH)/src/github.com/harmony-one/harmony/scripts/setup_bls_build_flags.sh"
hmy_bin="${hmy_one_dir}/go-sdk/hmy" hmy_gosdk="$(go env GOPATH)/src/github.com/harmony-one/go-sdk"
keystore="${hmy_one_dir}/harmony-ops/test-automation/api-tests/LocalnetValidatorKeys" hmy_bin="${hmy_gosdk}/hmy"
if [ ! -d "${hmy_one_dir}/harmony-ops/" ]; then hmy_ops="/tmp/harmony-ops"
git clone https://github.com/harmony-one/harmony-ops.git "${hmy_one_dir}/harmony-ops" keystore="${hmy_ops}/test-automation/api-tests/LocalnetValidatorKeys"
fi
if [ ! -d "${hmy_one_dir}/go-sdk/" ]; then rm -rf $hmy_ops
git clone https://github.com/harmony-one/go-sdk.git "${hmy_one_dir}/go-sdk" git clone https://github.com/harmony-one/harmony-ops.git $hmy_ops
if [ ! -d "${hmy_gosdk}" ]; then
git clone https://github.com/harmony-one/go-sdk.git $hmy_gosdk
fi fi
if [ ! -f "${hmy_bin}" ]; then if [ ! -f "${hmy_bin}" ]; then
make -C "${hmy_one_dir}/go-sdk/" make -C $hmy_gosdk
fi fi
hmy_version=$($hmy_bin version 2>&1 >/dev/null)
if [[ "${hmy_version:32:3}" -lt "135" ]]; then
echo "Aborting staking tests since CLI version is out of date."
return
fi
python3 -m pip install pyhmy python3 -m pip install pyhmy
python3 -m pip install requests python3 -m pip install requests
python3 "${hmy_one_dir}/harmony-ops/test-automation/api-tests/test.py" --keystore ${keystore} \ python3 "${hmy_ops}/test-automation/api-tests/test.py" --keystore $keystore \
--cli_path ${hmy_bin} --test_dir "${hmy_one_dir}/harmony-ops/test-automation/api-tests/tests/" \ --cli_path $hmy_bin --test_dir "${hmy_ops}/test-automation/api-tests/tests/" \
--rpc_endpoint_src="http://localhost:9500/" --rpc_endpoint_dst="http://localhost:9501/" --ignore_regression_test --rpc_endpoint_src="http://localhost:9500/" --rpc_endpoint_dst="http://localhost:9501/" --ignore_regression_test
} }

Loading…
Cancel
Save