diff --git a/config/tendermint_test/config.go b/config/tendermint_test/config.go index 2d67f7f9..ba589c02 100644 --- a/config/tendermint_test/config.go +++ b/config/tendermint_test/config.go @@ -1,3 +1,5 @@ +// Import this in all *_test.go files to initialize ~/.tendermint_test. + package tendermint_test import ( @@ -10,6 +12,12 @@ import ( cfg "github.com/tendermint/tendermint/config" ) +func init() { + // Creates ~/.tendermint_test/* + config := GetConfig("") + cfg.ApplyConfig(config) +} + func getTMRoot(rootDir string) string { if rootDir == "" { rootDir = os.Getenv("HOME") + "/.tendermint_test" diff --git a/consensus/pol_test.go b/consensus/pol_test.go index 04524461..db55bd5d 100644 --- a/consensus/pol_test.go +++ b/consensus/pol_test.go @@ -4,7 +4,7 @@ import ( "github.com/tendermint/tendermint/binary" . "github.com/tendermint/tendermint/common" sm "github.com/tendermint/tendermint/state" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" "bytes" diff --git a/consensus/state_test.go b/consensus/state_test.go index 3d57d8c6..8ab22039 100644 --- a/consensus/state_test.go +++ b/consensus/state_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/types/proposal_test.go b/consensus/types/proposal_test.go index f0599599..fea9f079 100644 --- a/consensus/types/proposal_test.go +++ b/consensus/types/proposal_test.go @@ -5,7 +5,7 @@ import ( "github.com/tendermint/tendermint/account" . "github.com/tendermint/tendermint/common" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" ) diff --git a/consensus/vote_set_test.go b/consensus/vote_set_test.go index 3e2f1ffc..2c94d682 100644 --- a/consensus/vote_set_test.go +++ b/consensus/vote_set_test.go @@ -6,7 +6,7 @@ import ( . "github.com/tendermint/tendermint/common" . "github.com/tendermint/tendermint/common/test" sm "github.com/tendermint/tendermint/state" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" "testing" diff --git a/hoge.png b/hoge.png deleted file mode 100644 index 3ba04d9b..00000000 Binary files a/hoge.png and /dev/null differ diff --git a/rpc/test/client_rpc_test.go b/rpc/test/client_rpc_test.go index 50cbd1b1..0ced2e66 100644 --- a/rpc/test/client_rpc_test.go +++ b/rpc/test/client_rpc_test.go @@ -1,7 +1,7 @@ package rpctest import ( - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "testing" ) diff --git a/rpc/test/client_ws_test.go b/rpc/test/client_ws_test.go index 4430418a..c61d08a7 100644 --- a/rpc/test/client_ws_test.go +++ b/rpc/test/client_ws_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/tendermint/tendermint/account" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" ) diff --git a/rpc/test/ws_helpers.go b/rpc/test/ws_helpers.go index d70b4af5..a7e6edf0 100644 --- a/rpc/test/ws_helpers.go +++ b/rpc/test/ws_helpers.go @@ -11,7 +11,7 @@ import ( "github.com/gorilla/websocket" "github.com/tendermint/tendermint/binary" "github.com/tendermint/tendermint/rpc/types" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" ) diff --git a/state/state_test.go b/state/state_test.go index b22d47cf..08120cb1 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -2,7 +2,7 @@ package state import ( "github.com/tendermint/tendermint/account" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" "github.com/tendermint/tendermint/types" "bytes" diff --git a/test/init.go b/test/init.go deleted file mode 100644 index 5b55d4e0..00000000 --- a/test/init.go +++ /dev/null @@ -1,15 +0,0 @@ -// Import this in all *_test.go files to initialize ~/.tendermint_test. -// TODO: Reset each time? - -package test - -import ( - cfg "github.com/tendermint/tendermint/config" - tmcfg "github.com/tendermint/tendermint/config/tendermint_test" -) - -func init() { - // Creates ~/.tendermint_test/* - config := tmcfg.GetConfig("") - cfg.ApplyConfig(config) -} diff --git a/types/tx_test.go b/types/tx_test.go index edee02d3..edc5b868 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -5,7 +5,7 @@ import ( "github.com/tendermint/tendermint/account" . "github.com/tendermint/tendermint/common" - _ "github.com/tendermint/tendermint/test" + _ "github.com/tendermint/tendermint/config/tendermint_test" ) func TestSendTxSignable(t *testing.T) {