From 145d45639dbf50b462f87507823b97aab6fab92b Mon Sep 17 00:00:00 2001 From: Vikman Fernandez-Castro Date: Thu, 13 Jul 2023 13:02:50 +0200 Subject: [PATCH] fix(#4281): Fix invalid_decoder_syntax.yaml file line lengths --- .../data/invalid_decoder_syntax.yaml | 55 ++++++++++++++----- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/tests/integration/test_logtest/test_invalid_rule_decoders_syntax/data/invalid_decoder_syntax.yaml b/tests/integration/test_logtest/test_invalid_rule_decoders_syntax/data/invalid_decoder_syntax.yaml index 767a4301f2..8089b262da 100644 --- a/tests/integration/test_logtest/test_invalid_rule_decoders_syntax/data/invalid_decoder_syntax.yaml +++ b/tests/integration/test_logtest/test_invalid_rule_decoders_syntax/data/invalid_decoder_syntax.yaml @@ -2,84 +2,111 @@ - name: "Invalid decoder syntax: garbage file" decoder: "custom_decoder_0.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 - output_data_msg: "(1226): Error reading XML file 'etc/decoders/custom_decoder_0.xml': XMLERR: Attribute 'is' has no value. (line 2)." + output_data_msg: >- + (1226): Error reading XML file 'etc/decoders/custom_decoder_0.xml': XMLERR: Attribute 'is' has no value. (line 2). output_data_codemsg: -1 - name: "Invalid decoder syntax: no closing XML tag" decoder: "custom_decoder_1.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 - output_data_msg: "(1226): Error reading XML file 'etc/decoders/custom_decoder_1.xml': XMLERR: End of file and some elements were not closed. (line 3)." + output: >- + ata_msg: "(1226): Error reading XML file 'etc/decoders/custom_decoder_1.xml': XMLERR: End of file and some elements + were not closed. (line 3). output_data_codemsg: -1 - name: "Invalid decoder syntax: no existing parent" decoder: "custom_decoder_2.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(2101): Parent decoder name invalid: 'test-parent'." output_data_codemsg: -1 - name: "Invalid decoder syntax: no existing attribute" decoder: "custom_decoder_3.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "Invalid element 'invalid_field' for decoder 'decoder'" output_data_codemsg: -1 - name: "Invalid decoder syntax: decoder with no name" decoder: "custom_decoder_4.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(1230): Invalid element in the configuration: 'decoder'." output_data_codemsg: -1 - name: "Invalid decoder syntax: regex attribute without order attribute" decoder: "custom_decoder_5.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(2107): Decoder configuration error: 'test'." output_data_codemsg: -1 - name: "Invalid decoder syntax: regex attribute without prematch/program_name/parent attribute" decoder: "custom_decoder_6.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(2108): No 'prematch' found in decoder: 'test'." output_data_codemsg: -1 - name: "Invalid decoder syntax: order attribute without regex attribute" decoder: "custom_decoder_7.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(2107): Decoder configuration error: 'test'." output_data_codemsg: -1 - name: "Invalid decoder syntax: two-level order parenting" decoder: "custom_decoder_8.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(2101): Parent decoder name invalid: 'name1'." output_data_codemsg: -1 - name: "Invalid decoder syntax: invalid plugin_decoder" decoder: "custom_decoder_9.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(2110): Invalid decoder argument for plugin_decoder: 'INVALID_Decoder'." output_data_codemsg: -1 - name: "Invalid decoder syntax: invalid offset" decoder: "custom_decoder_10.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "(2107): Decoder configuration error: 'name'." output_data_codemsg: -1 - name: "Invalid decoder syntax: invalid offset" decoder: "custom_decoder_11.xml" - input: '{"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}}' + input: >- + {"version":1,"origin":{"name":"Integration Test","module":"api"},"command":"log_processing","parameters":{"event": + "dummy log","log_format": "syslog","location": "master->/var/log/syslog"}} output_error: 0 output_data_msg: "ERROR: (2120): Invalid offset value: 'sudo-fields'" output_data_codemsg: -1