Skip to content

Commit 75ceddc

Browse files
committed
fixup tests with expected pid where it should be expected
1 parent 5fe4037 commit 75ceddc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/syslogparser/rfc3164/rfc3164_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func (s *Rfc3164TestSuite) TestParser_Valid(c *C) {
4646
"timestamp": time.Date(now.Year(), time.October, 11, 22, 14, 15, 0, time.UTC),
4747
"hostname": "mymachine",
4848
"tag": "very.large.syslog.message.tag",
49+
"pid": "",
4950
"content": "'su root' failed for lonvick on /dev/pts/8",
5051
"priority": 34,
5152
"facility": 4,
@@ -78,6 +79,7 @@ func (s *Rfc3164TestSuite) TestParser_ValidNoTag(c *C) {
7879
"timestamp": time.Date(now.Year(), time.October, 11, 22, 14, 15, 0, time.UTC),
7980
"hostname": "mymachine",
8081
"tag": "",
82+
"pid": "",
8183
"content": "singleword",
8284
"priority": 34,
8385
"facility": 4,
@@ -112,6 +114,7 @@ func (s *Rfc3164TestSuite) TestParser_NoTimestamp(c *C) {
112114
"timestamp": now,
113115
"hostname": "",
114116
"tag": "",
117+
"pid": "",
115118
"content": "INFO leaving (1) step postscripts",
116119
"priority": 14,
117120
"facility": 1,
@@ -164,6 +167,7 @@ func (s *Rfc3164TestSuite) TestParser_ValidRFC3339Timestamp(c *C) {
164167
"timestamp": time.Date(2018, time.January, 12, 22, 14, 15, 0, time.UTC),
165168
"hostname": "mymachine",
166169
"tag": "app",
170+
"pid": "101",
167171
"content": "msg",
168172
"priority": 34,
169173
"facility": 4,
@@ -184,6 +188,7 @@ func (s *Rfc3164TestSuite) TestParsemessage_Valid(c *C) {
184188
buff := []byte("sometag[123]: " + content)
185189
hdr := rfc3164message{
186190
tag: "sometag",
191+
pid: "123",
187192
content: content,
188193
}
189194

0 commit comments

Comments
 (0)