Skip to content

Commit

Permalink
[test] refs #279 - Solve lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
e1Ru1o committed Jan 22, 2020
1 parent 4c87246 commit ee62b8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/coin/skycoin/models/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestWalletListPendingTransactions(t *testing.T) {
wlt := wallets.Value()
account := wlt.GetCryptoAccount()
global_mock.On(method, wlt.GetId()).Return(response, errors.New("failure")).Once()
txns, err := account.ListPendingTransactions()
txns, err := account.ListPendingTransactions() // nolint gosec
require.Error(t, err)
global_mock.On(method, wlt.GetId()).Return(response, nil).Once()
txns, err = account.ListPendingTransactions()
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestSkycoinAddressGetBalance(t *testing.T) {
response.Confirmed = readable.Balance{Coins: uint64(42000000), Hours: uint64(200)}
skyAddrs := addr.GetCryptoAccount()
global_mock.On("Balance", []string{addr.String()}).Return(response, errors.New("failure")).Once()
val, err := skyAddrs.GetBalance(Sky)
val, err := skyAddrs.GetBalance(Sky) // nolint gosec
require.Error(t, err)
global_mock.On("Balance", []string{addr.String()}).Return(response, nil)
val, err = skyAddrs.GetBalance(Sky)
Expand Down Expand Up @@ -216,17 +216,17 @@ func TestLocalWalletGetBalance(t *testing.T) {

// wallet not found
wlt := &LocalWallet{WalletDir: "./testdata", Id: "no_wallet.wlt"}
val, err := wlt.GetBalance(Sky)
val, err := wlt.GetBalance(Sky) // nolint gosec
require.Error(t, err)

// api interaction error
wlt = &LocalWallet{WalletDir: "./testdata", Id: "test.wlt"}
val, err = wlt.GetBalance(Sky)
val, err = wlt.GetBalance(Sky) // nolint gosec
require.Error(t, err)

// invalid HeadOutputs
wlt = &LocalWallet{WalletDir: "./testdata", Id: "test.wlt"}
val, err = wlt.GetBalance(Sky)
val, err = wlt.GetBalance(Sky) // nolint gosec
require.Error(t, err)
response.HeadOutputs = response.HeadOutputs[:len(response.HeadOutputs)-1]

Expand Down
2 changes: 1 addition & 1 deletion src/coin/skycoin/models/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func TestSkycoinBlockchainStatusGetLastBlock(t *testing.T) {
status := &SkycoinBlockchain{CacheTime: 20}

// api interaction error
block, err := status.GetLastBlock()
block, err := status.GetLastBlock() // nolint gosec
require.Error(t, err)

block, err = status.GetLastBlock()
Expand Down

0 comments on commit ee62b8f

Please sign in to comment.