Skip to content

Commit

Permalink
Adjusting tests after reverting checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jleni committed Feb 8, 2019
1 parent a48899e commit b3c23b3
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 21 deletions.
2 changes: 0 additions & 2 deletions client/context/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/pkg/errors"
)

// BroadcastTx broadcasts a transactions either synchronously or asynchronously
Expand Down
6 changes: 1 addition & 5 deletions client/keys/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ func Test_runAddCmdBasic(t *testing.T) {
cmd := addKeyCommand()
assert.NotNil(t, cmd)

// Empty
err := runAddCmd(cmd, []string{})
assert.EqualError(t, err, "not enough arguments")

// Missing input (enter password)
err = runAddCmd(cmd, []string{"keyname"})
err := runAddCmd(cmd, []string{"keyname"})
assert.EqualError(t, err, "EOF")

// Prepare a keybase
Expand Down
4 changes: 0 additions & 4 deletions client/keys/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ func Test_runDeleteCmd(t *testing.T) {
fakeKeyName1 := "runDeleteCmd_Key1"
fakeKeyName2 := "runDeleteCmd_Key2"

err := runDeleteCmd(deleteKeyCommand, []string{})
require.Error(t, err)
require.Equal(t, "a name must be provided", err.Error())

// Now add a temporary keybase
kbHome, cleanUp, err := tests.GetTempDir("Test_runDeleteCmd")
assert.NoError(t, err)
Expand Down
5 changes: 1 addition & 4 deletions client/keys/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ func Test_showKeysCmd(t *testing.T) {
func Test_runShowCmd(t *testing.T) {
cmd := showKeysCmd()

err := runShowCmd(cmd, []string{})
assert.EqualError(t, err, "not enough arguments")

err = runShowCmd(cmd, []string{"invalid"})
err := runShowCmd(cmd, []string{"invalid"})
assert.EqualError(t, err, "Key invalid not found")

err = runShowCmd(cmd, []string{"invalid1", "invalid2"})
Expand Down
5 changes: 1 addition & 4 deletions client/keys/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ func Test_runUpdateCmd(t *testing.T) {

cmd := updateKeyCommand()

err := runUpdateCmd(cmd, []string{})
assert.EqualError(t, err, "not enough arguments")

// fails because it requests a password
err = runUpdateCmd(cmd, []string{fakeKeyName1})
err := runUpdateCmd(cmd, []string{fakeKeyName1})
assert.EqualError(t, err, "EOF")

cleanUp := client.OverrideStdin(bufio.NewReader(strings.NewReader("pass1234\n")))
Expand Down
2 changes: 0 additions & 2 deletions tests/test_cover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ PKGS=$(go list ./... | grep -v /vendor/ | grep -v github.com/cosmos/cosmos-sdk/c

set -e
echo "mode: atomic" > coverage.txt
for pkg in ${PKGS}; do
go test -v -timeout 30m -race -coverprofile=profile.out -covermode=atomic "$pkg"
for pkg in ${PKGS[@]}; do
go test -v -timeout 30m -race -coverprofile=profile.out -covermode=atomic -tags='ledger test_ledger_mock' "$pkg"
if [ -f profile.out ]; then
Expand Down

0 comments on commit b3c23b3

Please sign in to comment.