Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinssgh committed Apr 15, 2024
1 parent 2039df0 commit 140cf34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zetaclient/bitcoin/bitcoin_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package bitcoin
import (
"bytes"
"encoding/hex"
"errors"
"math"
"math/big"
"path"
Expand Down Expand Up @@ -479,6 +480,7 @@ func TestGetSenderAddressByVinErrors(t *testing.T) {
t.Run("should return error when RPC client fails to get raw tx", func(t *testing.T) {
// create mock rpc client without preloaded tx
rpcClient := stub.NewMockBTCRPCClient()
rpcClient.WithError(errors.New("no transaction found"))
txVin := btcjson.Vin{Txid: txHash, Vout: 2}
sender, err := GetSenderAddressByVin(rpcClient, txVin, net)
require.ErrorContains(t, err, "error getting raw transaction")
Expand Down

0 comments on commit 140cf34

Please sign in to comment.