Skip to content

Commit

Permalink
Merge PR #4651: Remove debugdb & colors
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored and alexanderbez committed Jul 1, 2019
1 parent 48e8161 commit b5cd01d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
11 changes: 0 additions & 11 deletions store/rootmulti/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
"github.com/cosmos/cosmos-sdk/store/types"
)

const useDebugDB = false

func TestStoreType(t *testing.T) {
db := dbm.NewMemDB()
store := NewStore(db)
Expand All @@ -39,9 +37,6 @@ func TestStoreMount(t *testing.T) {

func TestCacheMultiStoreWithVersion(t *testing.T) {
var db dbm.DB = dbm.NewMemDB()
if useDebugDB {
db = dbm.NewDebugDB("CMS", db)
}
ms := newMultiStoreWithMounts(db)
err := ms.LoadLatestVersion()
require.Nil(t, err)
Expand Down Expand Up @@ -79,9 +74,6 @@ func TestCacheMultiStoreWithVersion(t *testing.T) {

func TestHashStableWithEmptyCommit(t *testing.T) {
var db dbm.DB = dbm.NewMemDB()
if useDebugDB {
db = dbm.NewDebugDB("CMS", db)
}
ms := newMultiStoreWithMounts(db)
err := ms.LoadLatestVersion()
require.Nil(t, err)
Expand All @@ -106,9 +98,6 @@ func TestHashStableWithEmptyCommit(t *testing.T) {

func TestMultistoreCommitLoad(t *testing.T) {
var db dbm.DB = dbm.NewMemDB()
if useDebugDB {
db = dbm.NewDebugDB("CMS", db)
}
store := newMultiStoreWithMounts(db)
err := store.LoadLatestVersion()
require.Nil(t, err)
Expand Down
11 changes: 5 additions & 6 deletions tests/gobash.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (
"testing"

"github.com/stretchr/testify/require"
cmn "github.com/tendermint/tendermint/libs/common"
)

// ExecuteT executes the command, pipes any input to STDIN and return STDOUT,
// logging STDOUT/STDERR to t.
// nolint: errcheck
func ExecuteT(t *testing.T, cmd, input string) (stdout, stderr string) {
t.Log("Running", cmn.Cyan(cmd))
t.Log("Running", cmd)

// split cmd to name and args
split := strings.Split(cmd, " ")
Expand Down Expand Up @@ -43,11 +42,11 @@ func ExecuteT(t *testing.T, cmd, input string) (stdout, stderr string) {
proc.Wait()

if len(outbz) > 0 {
t.Log("Stdout:", cmn.Green(string(outbz)))
t.Log("Stdout:", string(outbz))
}

if len(errbz) > 0 {
t.Log("Stderr:", cmn.Red(string(errbz)))
t.Log("Stderr:", string(errbz))
}

stdout = strings.Trim(string(outbz), "\n")
Expand All @@ -59,7 +58,7 @@ func ExecuteT(t *testing.T, cmd, input string) (stdout, stderr string) {
// Execute the command, launch goroutines to log stdout/err to t.
// Caller should wait for .Wait() or .Stop() to terminate.
func GoExecuteT(t *testing.T, cmd string) (proc *Process) {
t.Log("Running", cmn.Cyan(cmd))
t.Log("Running", cmd)

// Split cmd to name and args.
split := strings.Split(cmd, " ")
Expand All @@ -77,7 +76,7 @@ func GoExecuteT(t *testing.T, cmd string) (proc *Process) {

// Same as GoExecuteT but spawns a go routine to ReadAll off stdout.
func GoExecuteTWithStdout(t *testing.T, cmd string) (proc *Process) {
t.Log("Running", cmn.Cyan(cmd))
t.Log("Running", cmd)

// Split cmd to name and args.
split := strings.Split(cmd, " ")
Expand Down

0 comments on commit b5cd01d

Please sign in to comment.