Skip to content

Commit

Permalink
fix(test): initial fix to test suite (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme authored Jan 20, 2025
1 parent a35ac19 commit a333e6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/humanlogio/api/go v0.0.0-20250117080233-3e6fac65b137
github.com/humanlogio/humanlog-pro v0.0.0-20250117080314-d356dff4de18
github.com/humanlogio/humanlog-pro v0.0.0-20250120055111-81f9f994a035
github.com/kr/logfmt v0.0.0-20210122060352-19f9bcb100e6
github.com/lrstanley/bubblezone v0.0.0-20240914071701-b48c55a5e78e
github.com/matoous/go-nanoid v1.5.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ github.com/humanlogio/api/go v0.0.0-20250117080233-3e6fac65b137 h1:8Udl0XG9H6hks
github.com/humanlogio/api/go v0.0.0-20250117080233-3e6fac65b137/go.mod h1:sjMKAl97fvxNckIhcGWAxZwv6+c+I0thx5QvMc1ifaM=
github.com/humanlogio/humanlog-pro v0.0.0-20250117080314-d356dff4de18 h1:XODwlE2UJyJxq774X7DQGFarPYH+/vNvLviSZVFDaiw=
github.com/humanlogio/humanlog-pro v0.0.0-20250117080314-d356dff4de18/go.mod h1:U2RdxnExtDjbH0gf6aeNYBkHp9E0OgB5Z3qtKYrPLXg=
github.com/humanlogio/humanlog-pro v0.0.0-20250120055111-81f9f994a035 h1:8V+0vDmfbph89YpnbN3dFsXnu2nmhbSLfZVjxF7N5Ug=
github.com/humanlogio/humanlog-pro v0.0.0-20250120055111-81f9f994a035/go.mod h1:U2RdxnExtDjbH0gf6aeNYBkHp9E0OgB5Z3qtKYrPLXg=
github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4=
github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE=
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
Expand Down
4 changes: 2 additions & 2 deletions pkg/localstorage/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func RunTest(t *testing.T, constructor func(t *testing.T) Storage) {
}{
{
name: "nothing",
q: `{from==2006-01-02T15:04:06.000}`,
q: `{from==2006-01-02T15:04:06.00000000Z}`,
limit: 4,
input: []*typesv1.IngestedLogEvent{
{MachineId: 1, SessionId: 2, EventId: 1, ParsedAt: timestamppb.New(musttime("2006-01-02T15:04:06.001")), Raw: []byte("hello world 1")},
Expand Down Expand Up @@ -224,7 +224,7 @@ func RunTest(t *testing.T, constructor func(t *testing.T) Storage) {
require.NoError(t, err)
}()
for _, ev := range tt.input {
if ev == nil {
if snk == nil {
var err error
snk, _, err = db.SinkFor(ctx, ev.MachineId, ev.SessionId)
require.NoError(t, err)
Expand Down

0 comments on commit a333e6f

Please sign in to comment.