Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-vl committed Nov 4, 2021
1 parent c039b1e commit a09fb12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/redis-zset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ func TestQueryZRange(t *testing.T) {
{
"should handle default array of strings",
queryModel{Command: models.ZRange, Key: "test:zset", ZRangeQuery: "BYSCORE", Min: "-inf", Max: "+inf"},
[]string{"member1", "10", "member2", "2", "member3", "15"},
[]string{"member1", "test", "member2", "2", "member3", "15"},
3,
1,
[]valueToCheckInResponse{
{frameIndex: 0, fieldIndex: 0, rowIndex: 0, value: float64(10)},
{frameIndex: 0, fieldIndex: 0, rowIndex: 0, value: "test"},
{frameIndex: 0, fieldIndex: 1, rowIndex: 0, value: float64(2)},
{frameIndex: 0, fieldIndex: 2, rowIndex: 0, value: float64(15)},
},
nil,
},
{
"should handle error",
queryModel{Command: models.HGetAll},
queryModel{Command: models.ZRange},
nil,
0,
0,
Expand All @@ -67,7 +67,7 @@ func TestQueryZRange(t *testing.T) {
t.Parallel()

client := testClient{rcv: tt.rcv, err: tt.err}
response := queryHGetAll(tt.qm, &client)
response := queryZRange(tt.qm, &client)
if tt.err != nil {
require.EqualError(t, response.Error, tt.err.Error(), "Should set error to response if failed")
require.Nil(t, response.Frames, "No frames should be created if failed")
Expand Down

0 comments on commit a09fb12

Please sign in to comment.