File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11package test
22
33import (
4+ "context"
45 "testing"
6+ "time"
57
68 "github.com/google/go-cmp/cmp"
79 api "github.com/qubic/archive-query-service/v2/api/archive-query-service/v2"
@@ -258,14 +260,18 @@ func (s *ServerTestSuite) TestGetEvents_InvalidFilter() {
258260
259261func (s * ServerTestSuite ) TestGetEvents_InvalidEventType () {
260262 t := s .T ()
261- _ , err := s .client .GetEvents (t .Context (), & api.GetEventsRequest {
262- Filters : map [string ]string {"eventType" : "99" },
263+ ctx , cancel := context .WithTimeout (t .Context (), 3 * time .Second )
264+ defer cancel ()
265+
266+ _ , err := s .client .GetEvents (ctx , & api.GetEventsRequest {
267+ Filters : map [string ]string {"eventType" : "invalid" },
263268 })
264269 require .Error (t , err )
265270 st , ok := status .FromError (err )
266271 require .True (t , ok )
267272 assert .Equal (t , codes .InvalidArgument , st .Code ())
268- assert .Contains (t , st .Message (), "invalid eventType" )
273+ assert .Contains (t , st .Message (), "validating filters" )
274+ assert .Contains (t , st .Message (), "invalid [eventType] filter" )
269275}
270276
271277func (s * ServerTestSuite ) TestGetEvents_InvalidTickNumber () {
You can’t perform that action at this time.
0 commit comments