From 19e94c18c985a2b9645f1b4c82dd04bf3f873729 Mon Sep 17 00:00:00 2001 From: Jose Riguera Date: Thu, 30 May 2024 11:22:17 +0200 Subject: [PATCH] [receiver/cloudfoundryreceiver] Change json test with error type log Co-authored-by: Cem Deniz Kabakci --- receiver/cloudfoundryreceiver/converter_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/receiver/cloudfoundryreceiver/converter_test.go b/receiver/cloudfoundryreceiver/converter_test.go index a6e77a7989a2..88e0056a3f3f 100644 --- a/receiver/cloudfoundryreceiver/converter_test.go +++ b/receiver/cloudfoundryreceiver/converter_test.go @@ -326,7 +326,7 @@ func TestConvertLogsEnvelope(t *testing.T) { }, }, { - id: "json-log-with-sourcetype", + id: "json-log-with-sourcetype-error", envelope: loggregator_v2.Envelope{ Timestamp: before.UnixNano(), SourceId: "df75aec8-b937-4dc8-9b4d-c336e36e3895", @@ -341,7 +341,7 @@ func TestConvertLogsEnvelope(t *testing.T) { Message: &loggregator_v2.Envelope_Log{ Log: &loggregator_v2.Log{ Payload: []byte(`{"timestamp":"2024-05-29T16:16:28.063062903Z","level":"info","source":"guardian","message":"guardian.api.garden-server.get-properties.got-properties","data":{"handle":"e885e8be-c6a7-43b1-5066-a821","session":"2.1.209666"}}`), - Type: loggregator_v2.Log_OUT, + Type: loggregator_v2.Log_ERR, }, }, }, @@ -357,8 +357,8 @@ func TestConvertLogsEnvelope(t *testing.T) { "org.cloudfoundry.ip": "10.80.0.2", }, "Body": `{"timestamp":"2024-05-29T16:16:28.063062903Z","level":"info","source":"guardian","message":"guardian.api.garden-server.get-properties.got-properties","data":{"handle":"e885e8be-c6a7-43b1-5066-a821","session":"2.1.209666"}}`, - "SeverityNumber": plog.SeverityNumberInfo, - "SeverityText": plog.SeverityNumberInfo.String(), + "SeverityNumber": plog.SeverityNumberError, + "SeverityText": plog.SeverityNumberError.String(), "TraceID": "", "SpanID": "", "Flags": 0,