From b5cd01d1a80b6f67cadfdd79039ffb44863759ab Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 1 Jul 2019 15:53:16 +0200 Subject: [PATCH] Merge PR #4651: Remove debugdb & colors --- store/rootmulti/store_test.go | 11 ----------- tests/gobash.go | 11 +++++------ 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index df2714c6c..24651c236 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/tests/gobash.go b/tests/gobash.go index e7bcaa100..02a113574 100644 --- a/tests/gobash.go +++ b/tests/gobash.go @@ -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, " ") @@ -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") @@ -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, " ") @@ -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, " ")