2014-03-03 07:26:41 +01:00
|
|
|
#! /bin/bash
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
export YES_COLOR=1
|
2014-03-03 07:26:41 +01:00
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# journald json log format is not working"
|
|
|
|
run_cap_test env TZ=UTC ${lnav_test} -n \
|
2018-08-21 20:10:03 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_journald.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json log format is not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2014-03-03 07:26:41 +01:00
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json log format is not working"
|
|
|
|
run_cap_test ${lnav_test} -n -I ${test_dir} \
|
2019-04-18 13:26:24 +02:00
|
|
|
-c ':switch-to-view pretty' \
|
|
|
|
-c ':switch-to-view log' \
|
|
|
|
-c ':switch-to-view pretty' \
|
2016-12-06 01:34:30 +01:00
|
|
|
${test_dir}/logfile_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# multi-line-format json log format is not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2016-08-23 15:34:18 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/log.clog
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# log levels not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2015-04-11 04:50:05 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ';select * from test_log' \
|
|
|
|
-c ':write-csv-to -' \
|
|
|
|
${test_dir}/logfile_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# log levels not working" < ${test_dir}/logfile_jso
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2021-05-14 22:31:19 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ';select log_raw_text from test_log' \
|
|
|
|
-c ':write-raw-to -' \
|
|
|
|
${test_dir}/logfile_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# write-raw-to with json is not working" <
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2021-05-14 22:31:19 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ':goto 0' \
|
|
|
|
-c ':mark' \
|
|
|
|
-c ':goto 1' \
|
|
|
|
-c ':mark' \
|
|
|
|
-c ':goto 2' \
|
|
|
|
-c ':mark' \
|
|
|
|
-c ':write-raw-to -' \
|
|
|
|
${test_dir}/log.clog
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json output not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2018-11-15 06:46:49 +01:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ';select * from test_log' \
|
|
|
|
-c ':write-json-to -' \
|
|
|
|
${test_dir}/logfile_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# timestamp-format not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2016-08-19 07:15:35 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_json2.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# log levels not working"
|
|
|
|
run_cap_test ${lnav_test} -n -d /tmp/lnav.err \
|
2016-03-28 00:14:52 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ';select * from json_log2' \
|
|
|
|
-c ':write-csv-to -' \
|
|
|
|
${test_dir}/logfile_json2.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# pipe-line-to is not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2015-03-19 06:57:30 +01:00
|
|
|
-I ${test_dir} \
|
2019-05-13 19:35:54 +02:00
|
|
|
-c ":goto 4" \
|
2015-03-19 06:57:30 +01:00
|
|
|
-c ":pipe-line-to sed -e 's/2013//g'" \
|
|
|
|
-c ":switch-to-view text" \
|
|
|
|
${test_dir}/logfile_json.json
|
2015-04-26 13:57:36 +02:00
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json log format is not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2015-04-26 13:57:36 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_nested_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# log levels not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2015-04-26 13:57:36 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ';select * from ntest_log' \
|
|
|
|
-c ':write-csv-to -' \
|
|
|
|
${test_dir}/logfile_nested_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# pipe-line-to is not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2015-04-26 13:57:36 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ":goto 4" \
|
|
|
|
-c ":pipe-line-to sed -e 's/2013//g'" \
|
|
|
|
-c ":switch-to-view text" \
|
|
|
|
${test_dir}/logfile_nested_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json log3 format is not working"
|
2022-09-03 08:06:03 +02:00
|
|
|
run_cap_test env TZ=UTC ${lnav_test} -n \
|
2017-04-07 08:05:20 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_json3.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json log3 format is not working"
|
2022-09-03 08:06:03 +02:00
|
|
|
run_cap_test env TZ=UTC ${lnav_test} -n \
|
|
|
|
-I ${test_dir} \
|
|
|
|
-c ';select * from json_log3' \
|
|
|
|
-c ':write-csv-to -' \
|
|
|
|
${test_dir}/logfile_json3.json
|
|
|
|
|
|
|
|
run_cap_test env TZ=America/New_York ${lnav_test} -n \
|
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_json3.json
|
|
|
|
|
|
|
|
# json log3 format is not working"
|
|
|
|
run_cap_test env TZ=America/New_York ${lnav_test} -n \
|
2017-04-07 08:05:20 +02:00
|
|
|
-I ${test_dir} \
|
|
|
|
-c ';select * from json_log3' \
|
|
|
|
-c ':write-csv-to -' \
|
|
|
|
${test_dir}/logfile_json3.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json log format is not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2019-09-03 15:19:57 +02:00
|
|
|
-d /tmp/lnav.err \
|
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_invalid_json.json
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# json log format is not working"
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2021-11-05 23:13:16 +01:00
|
|
|
-d /tmp/lnav.err \
|
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_invalid_json2.json
|
2022-09-25 06:19:20 +02:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_mixed_json2.json
|
2022-10-03 06:58:10 +02:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
-I ${test_dir} \
|
|
|
|
${test_dir}/logfile_json_subsec.json
|