Skip to content

Commit

Permalink
Happy new year: updated unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
svenwiltink committed Jan 2, 2019
1 parent bf4175b commit a363c09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/parsers/grok/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -915,17 +915,17 @@ func TestSyslogTimestamp(t *testing.T) {
{
name: "two digit day of month",
line: "Sep 25 09:01:55 value=42",
expected: time.Date(2018, time.September, 25, 9, 1, 55, 0, time.UTC),
expected: time.Date(2019, time.September, 25, 9, 1, 55, 0, time.UTC),
},
{
name: "one digit day of month single space",
line: "Sep 2 09:01:55 value=42",
expected: time.Date(2018, time.September, 2, 9, 1, 55, 0, time.UTC),
expected: time.Date(2019, time.September, 2, 9, 1, 55, 0, time.UTC),
},
{
name: "one digit day of month double space",
line: "Sep 2 09:01:55 value=42",
expected: time.Date(2018, time.September, 2, 9, 1, 55, 0, time.UTC),
expected: time.Date(2019, time.September, 2, 9, 1, 55, 0, time.UTC),
},
}
for _, tt := range tests {
Expand Down Expand Up @@ -1023,5 +1023,5 @@ func TestEmptyYearInTimestamp(t *testing.T) {
m, err := p.ParseLine("Nov 6 13:57:03 generic iTunes[6504]: objc[6504]: Object descriptor was null.")
require.NoError(t, err)
require.NotNil(t, m)
require.Equal(t, 2018, m.Time().Year())
require.Equal(t, 2019, m.Time().Year())
}

0 comments on commit a363c09

Please sign in to comment.