fix missing error check, improve get test
This commit is contained in:
parent
68347e8b95
commit
7aaa47e142
|
@ -144,7 +144,9 @@ func TestTelemDb(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("error getting packets: %v", err)
|
||||
}
|
||||
t.Log(pkt)
|
||||
if len(pkt) != 1 {
|
||||
t.Fatalf("expected exactly one response, got %d", len(pkt))
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("test read-write packet", func(t *testing.T) {
|
||||
|
|
|
@ -93,6 +93,9 @@ func (tdb *TelemDb) GetPackets(ctx context.Context, filter BusEventFilter, optio
|
|||
Name: ev.Name,
|
||||
}
|
||||
BusEv.Data, err = skylab.FromJson(ev.Name, ev.Data)
|
||||
if err != nil {
|
||||
return events, nil
|
||||
}
|
||||
events = append(events, BusEv)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue