add decode test

This commit is contained in:
Aaron Stein 2019-08-23 13:28:00 -07:00
parent 45c48035c7
commit df8b175e86

View file

@ -196,6 +196,18 @@ func TestSyslogDecoding(t *testing.T) {
},
ExpectedError: nil,
},
Spec{
Title: "Parses Rsyslog_ FileFormat with simple log body for slowquery",
Input: `2017-06-26T23:32:23.285001+00:00 aws-rds production-aurora-test-db: Slow query: select * from table.`,
ExpectedOutput: map[string]interface{}{
"timestamp": logTime,
"hostname": "aws-rds",
"programname": "production-aurora-test-db",
"rawlog": "Slow query: select * from table.",
"decoder_msg_type": "syslog",
},
ExpectedError: nil,
},
Spec{
Title: "Fails to parse non-RSyslog log line",
Input: `not rsyslog`,