Skip to content

Commit

Permalink
fixup tests with expected pid where it should be expected
Browse files Browse the repository at this point in the history
  • Loading branch information
guss77 committed Sep 5, 2018
1 parent 5fe4037 commit ff8fbec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/syslogparser/rfc3164/rfc3164_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (s *Rfc3164TestSuite) TestParser_Valid(c *C) {
"timestamp": time.Date(now.Year(), time.October, 11, 22, 14, 15, 0, time.UTC),
"hostname": "mymachine",
"tag": "very.large.syslog.message.tag",
"pid": "",
"content": "'su root' failed for lonvick on /dev/pts/8",
"priority": 34,
"facility": 4,
Expand Down Expand Up @@ -78,6 +79,7 @@ func (s *Rfc3164TestSuite) TestParser_ValidNoTag(c *C) {
"timestamp": time.Date(now.Year(), time.October, 11, 22, 14, 15, 0, time.UTC),
"hostname": "mymachine",
"tag": "",
"pid": "",
"content": "singleword",
"priority": 34,
"facility": 4,
Expand Down Expand Up @@ -112,6 +114,7 @@ func (s *Rfc3164TestSuite) TestParser_NoTimestamp(c *C) {
"timestamp": now,
"hostname": "",
"tag": "",
"pid": "",
"content": "INFO leaving (1) step postscripts",
"priority": 14,
"facility": 1,
Expand Down Expand Up @@ -164,6 +167,7 @@ func (s *Rfc3164TestSuite) TestParser_ValidRFC3339Timestamp(c *C) {
"timestamp": time.Date(2018, time.January, 12, 22, 14, 15, 0, time.UTC),
"hostname": "mymachine",
"tag": "app",
"pid": "101",
"content": "msg",
"priority": 34,
"facility": 4,
Expand All @@ -184,7 +188,8 @@ func (s *Rfc3164TestSuite) TestParsemessage_Valid(c *C) {
buff := []byte("sometag[123]: " + content)
hdr := rfc3164message{
tag: "sometag",
content: content,
pid: "123",
content: content
}

s.assertRfc3164message(c, hdr, buff, len(buff), syslogparser.ErrEOL)
Expand Down

0 comments on commit ff8fbec

Please sign in to comment.