Skip to content

Commit

Permalink
fix middleware tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chappjc committed Jun 23, 2021
1 parent 72d98c9 commit 7440e47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/dcrdata/middleware/apimiddleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ func TestGetAddressCtx(t *testing.T) {
args: args{2, []string{"DcxxxxcGjmENx4DhNqDctW5wJCVyT3Qeqkx"}},
want: nil,
wantErr: true,
errMsg: "invalid address 'DcxxxxcGjmENx4DhNqDctW5wJCVyT3Qeqkx' for this network: checksum mismatch",
errMsg: `invalid address "DcxxxxcGjmENx4DhNqDctW5wJCVyT3Qeqkx" for this network: "checksum mismatch"`,
},
{
testName: "wrong_net",
args: args{2, []string{"TsWmwignm9Q6iBQMSHw9WhBeR5wgUPpD14Q"}},
want: nil,
wantErr: true,
errMsg: `invalid address 'TsWmwignm9Q6iBQMSHw9WhBeR5wgUPpD14Q' for this network: unknown address type`,
errMsg: `invalid address "TsWmwignm9Q6iBQMSHw9WhBeR5wgUPpD14Q" for this network: "unknown address type"`,
},
}
for _, tt := range tests {
Expand Down
8 changes: 4 additions & 4 deletions exchanges/exchanges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ func TestPoloniexWebsocket(t *testing.T) {
}

type testBittrexConnection struct {
xc *BittrexExchange
subscription hubs.ClientMsg
xc *BittrexExchange
// subscription hubs.ClientMsg
}

func (conn testBittrexConnection) Close() {}
Expand All @@ -243,8 +243,8 @@ func (conn testBittrexConnection) On() bool {
return false
}

func (conn testBittrexConnection) Send(subscription hubs.ClientMsg) error {
conn.subscription = subscription
func (conn testBittrexConnection) Send(_ hubs.ClientMsg) error {
// conn.subscription = subscription
return nil
}

Expand Down

0 comments on commit 7440e47

Please sign in to comment.