Browse Source

fix warnings

pull/1842/head
Petabyte Storage 7 years ago
parent
commit
ebc543ebe3
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      pubsub/query/parser_test.go
  2. +3
    -3
      pubsub/query/query_test.go

+ 2
- 2
pubsub/query/parser_test.go View File

@ -83,9 +83,9 @@ func TestParser(t *testing.T) {
for _, c := range cases {
_, err := query.New(c.query)
if c.valid {
assert.NoError(t, err, "Query was '%s'", c.query)
assert.NoErrorf(t, err, "Query was '%s'", c.query)
} else {
assert.Error(t, err, "Query was '%s'", c.query)
assert.Errorf(t, err, "Query was '%s'", c.query)
}
}
}

+ 3
- 3
pubsub/query/query_test.go View File

@ -71,9 +71,9 @@ func TestConditions(t *testing.T) {
s string
conditions []query.Condition
}{
{"tm.events.type='NewBlock'", []query.Condition{query.Condition{"tm.events.type", query.OpEqual, "NewBlock"}}},
{"tx.gas > 7 AND tx.gas < 9", []query.Condition{query.Condition{"tx.gas", query.OpGreater, int64(7)}, query.Condition{"tx.gas", query.OpLess, int64(9)}}},
{"tx.time >= TIME 2013-05-03T14:45:00Z", []query.Condition{query.Condition{"tx.time", query.OpGreaterEqual, txTime}}},
{s: "tm.events.type='NewBlock'", conditions: []query.Condition{query.Condition{Tag: "tm.events.type", Op: query.OpEqual, Operand: "NewBlock"}}},
{s: "tx.gas > 7 AND tx.gas < 9", conditions: []query.Condition{query.Condition{Tag: "tx.gas", Op: query.OpGreater, Operand: int64(7)}, query.Condition{Tag: "tx.gas", Op: query.OpLess, Operand: int64(9)}}},
{s: "tx.time >= TIME 2013-05-03T14:45:00Z", conditions: []query.Condition{query.Condition{Tag: "tx.time", Op: query.OpGreaterEqual, Operand: txTime}}},
}
for _, tc := range testCases {


Loading…
Cancel
Save