Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove debugdb & colors #4651

Merged
merged 4 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pending/improvements/sdk/remove-debugdb-color
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remove debugdb & colors
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved
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