importing tendermint/config/tendermint_test applies the test config

This commit is contained in:
Jae Kwon
2015-05-17 16:19:58 -07:00
parent 161aa8c5e9
commit 489bf767cb
12 changed files with 17 additions and 24 deletions
+8
View File
@@ -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"