From 23a539ae6f40985ff7c4ac58c9a85e5d9d7fc35d Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 4 Sep 2017 16:22:27 +0200 Subject: [PATCH] Improve import of general tests/cli stuff as per rigel --- examples/basecoin/tests/cli/basictx.sh | 4 +--- examples/basecoin/tests/cli/ibc.sh | 4 +--- examples/basecoin/tests/cli/init.sh | 4 +--- examples/basecoin/tests/cli/keys.sh | 4 +--- examples/basecoin/tests/cli/rest.sh | 4 +--- examples/basecoin/tests/cli/restart.sh | 4 +--- examples/basecoin/tests/cli/roles.sh | 4 +--- examples/basecoin/tests/cli/rpc.sh | 3 +-- examples/counter/tests/cli/counter.sh | 4 +--- examples/eyes/tests/cli/eyes.sh | 2 +- 10 files changed, 10 insertions(+), 27 deletions(-) diff --git a/examples/basecoin/tests/cli/basictx.sh b/examples/basecoin/tests/cli/basictx.sh index ac9305c0f..2ae46fce1 100755 --- a/examples/basecoin/tests/cli/basictx.sh +++ b/examples/basecoin/tests/cli/basictx.sh @@ -116,9 +116,7 @@ test03CreditTx() { # Load common then run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/common.sh . $CLI_DIR/shunit2 diff --git a/examples/basecoin/tests/cli/ibc.sh b/examples/basecoin/tests/cli/ibc.sh index 7bf70f10d..45ab13b27 100755 --- a/examples/basecoin/tests/cli/ibc.sh +++ b/examples/basecoin/tests/cli/ibc.sh @@ -353,9 +353,7 @@ assertNewHeight() { # Load common then run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/common.sh . $CLI_DIR/shunit2 diff --git a/examples/basecoin/tests/cli/init.sh b/examples/basecoin/tests/cli/init.sh index 62d50fb8e..473583222 100755 --- a/examples/basecoin/tests/cli/init.sh +++ b/examples/basecoin/tests/cli/init.sh @@ -105,8 +105,6 @@ checkDir() { # load and run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/shunit2 diff --git a/examples/basecoin/tests/cli/keys.sh b/examples/basecoin/tests/cli/keys.sh index 36cbcbb9b..8b01aa186 100755 --- a/examples/basecoin/tests/cli/keys.sh +++ b/examples/basecoin/tests/cli/keys.sh @@ -26,8 +26,6 @@ testMakeKeys() { # load and run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/shunit2 diff --git a/examples/basecoin/tests/cli/rest.sh b/examples/basecoin/tests/cli/rest.sh index 672fb32d1..2d2c86de6 100755 --- a/examples/basecoin/tests/cli/rest.sh +++ b/examples/basecoin/tests/cli/rest.sh @@ -151,9 +151,7 @@ test04CreateRoleInvalid() { # Load common then run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/common.sh . $CLI_DIR/shunit2 diff --git a/examples/basecoin/tests/cli/restart.sh b/examples/basecoin/tests/cli/restart.sh index 37ccb35ce..c091b32e7 100755 --- a/examples/basecoin/tests/cli/restart.sh +++ b/examples/basecoin/tests/cli/restart.sh @@ -78,9 +78,7 @@ test01OnRestart() { # Load common then run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/common.sh . $CLI_DIR/shunit2 diff --git a/examples/basecoin/tests/cli/roles.sh b/examples/basecoin/tests/cli/roles.sh index 8a690d617..1dece90ec 100755 --- a/examples/basecoin/tests/cli/roles.sh +++ b/examples/basecoin/tests/cli/roles.sh @@ -90,9 +90,7 @@ test03SendMultiFromRole() { # Load common then run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/common.sh . $CLI_DIR/shunit2 diff --git a/examples/basecoin/tests/cli/rpc.sh b/examples/basecoin/tests/cli/rpc.sh index 9d611e4cc..bb2c8b429 100755 --- a/examples/basecoin/tests/cli/rpc.sh +++ b/examples/basecoin/tests/cli/rpc.sh @@ -127,7 +127,6 @@ test03Waiting() { # load and run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli . $CLI_DIR/shunit2 diff --git a/examples/counter/tests/cli/counter.sh b/examples/counter/tests/cli/counter.sh index ad9f994e5..53eebbe12 100755 --- a/examples/counter/tests/cli/counter.sh +++ b/examples/counter/tests/cli/counter.sh @@ -112,9 +112,7 @@ test03AddCount() { # Load common then run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory - -# TODO: how to handle this if we are not in the same directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/common.sh . $CLI_DIR/shunit2 diff --git a/examples/eyes/tests/cli/eyes.sh b/examples/eyes/tests/cli/eyes.sh index 7f8a427c7..f1e52b0ac 100755 --- a/examples/eyes/tests/cli/eyes.sh +++ b/examples/eyes/tests/cli/eyes.sh @@ -66,7 +66,7 @@ test00SetGetRemove() { # Load common then run these tests with shunit2! DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #get this files directory -CLI_DIR=${DIR}/../../../../tests/cli +CLI_DIR=$GOPATH/src/github.com/cosmos/cosmos-sdk/tests/cli . $CLI_DIR/common.sh . $CLI_DIR/shunit2