Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge branch 'versions/0.8' into dev
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGES.txt
	CMakeLists.txt
	cmd/hekad/main.go
	docs/source/conf.py
  • Loading branch information
rafrombrc committed Jan 5, 2015
2 parents 6960625 + 8a4a6ed commit 61bff89
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ Features

* Added `send_interval` setting to SmtpOutput.

0.8.2 (2015-01-05)
==================

Bug Handling
------------

* Fix rsyslog sandbox decoder test to use current year and location for
timestamp parsing, since syslog timestamp format makes that assumption.

* Ensure that geoip_decoder is not included in release binaries.

0.8.1 (2014-12-17)
==================

Expand Down
15 changes: 12 additions & 3 deletions sandbox/plugins/sandbox_decoders_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package plugins

import (
"fmt"
"github.com/mozilla-services/heka/message"
"github.com/mozilla-services/heka/pipeline"
ts "github.com/mozilla-services/heka/pipeline/testsupport"
Expand All @@ -9,6 +10,7 @@ import (
"github.com/rafrombrc/gomock/gomock"
gs "github.com/rafrombrc/gospec/src/gospec"
"os"
"time"
)

func DecoderSpec(c gs.Context) {
Expand Down Expand Up @@ -624,9 +626,16 @@ HugePages_Free: 0
_, err = decoder.Decode(pack)
c.Assume(err, gs.IsNil)

c.Expect(pack.Message.GetTimestamp(),
gs.Equals,
int64(1392065938000000000))
// Syslog timestamp doesn't support year, so we have to calculate
// it for the current year or else this test will fail every
// January.
year := time.Now().Year()
tStr := fmt.Sprintf("%d Feb 10 12:58:58 -0800", year)
t, err := time.Parse("2006 Jan 02 15:04:05 -0700", tStr)
c.Assume(err, gs.IsNil)
unixT := t.UnixNano()

c.Expect(pack.Message.GetTimestamp(), gs.Equals, unixT)

c.Expect(pack.Message.GetSeverity(), gs.Equals, int32(4))
c.Expect(pack.Message.GetHostname(), gs.Equals, "testhost")
Expand Down

0 comments on commit 61bff89

Please sign in to comment.