mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 21:31:23 +00:00
importing tendermint/config/tendermint_test applies the test config
This commit is contained in:
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
_ "github.com/tendermint/tendermint/test"
|
||||
_ "github.com/tendermint/tendermint/config/tendermint_test"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package rpctest
|
||||
|
||||
import (
|
||||
_ "github.com/tendermint/tendermint/test"
|
||||
_ "github.com/tendermint/tendermint/config/tendermint_test"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
|
15
test/init.go
15
test/init.go
@ -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)
|
||||
}
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user