Browse Source

importing tendermint/config/tendermint_test applies the test config

pull/69/head
Jae Kwon 10 years ago
parent
commit
489bf767cb
12 changed files with 17 additions and 24 deletions
  1. +8
    -0
      config/tendermint_test/config.go
  2. +1
    -1
      consensus/pol_test.go
  3. +1
    -1
      consensus/state_test.go
  4. +1
    -1
      consensus/types/proposal_test.go
  5. +1
    -1
      consensus/vote_set_test.go
  6. BIN
      hoge.png
  7. +1
    -1
      rpc/test/client_rpc_test.go
  8. +1
    -1
      rpc/test/client_ws_test.go
  9. +1
    -1
      rpc/test/ws_helpers.go
  10. +1
    -1
      state/state_test.go
  11. +0
    -15
      test/init.go
  12. +1
    -1
      types/tx_test.go

+ 8
- 0
config/tendermint_test/config.go 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"


+ 1
- 1
consensus/pol_test.go View File

@ -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"


+ 1
- 1
consensus/state_test.go View File

@ -4,7 +4,7 @@ import (
"bytes"
"testing"
_ "github.com/tendermint/tendermint/test"
_ "github.com/tendermint/tendermint/config/tendermint_test"
"github.com/tendermint/tendermint/types"
)


+ 1
- 1
consensus/types/proposal_test.go View File

@ -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"
)


+ 1
- 1
consensus/vote_set_test.go View File

@ -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"


BIN
hoge.png View File

Before After
Width: 5333  |  Height: 2608  |  Size: 1.1 MiB

+ 1
- 1
rpc/test/client_rpc_test.go View File

@ -1,7 +1,7 @@
package rpctest
import (
_ "github.com/tendermint/tendermint/test"
_ "github.com/tendermint/tendermint/config/tendermint_test"
"testing"
)


+ 1
- 1
rpc/test/client_ws_test.go View File

@ -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"
)


+ 1
- 1
rpc/test/ws_helpers.go View File

@ -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"
)


+ 1
- 1
state/state_test.go View File

@ -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"


+ 0
- 15
test/init.go View File

@ -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)
}

+ 1
- 1
types/tx_test.go View File

@ -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) {


Loading…
Cancel
Save