mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +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"
|
||||
|
||||
Reference in New Issue
Block a user