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