From: git@jeffhostetler.com Date: Fri, 13 Jul 2018 16:56:15 GMT Subject: [PATCH v1 19/25] structured-logging: t0420 tests for aux-data Message-ID: <20180713165621.52017-20-git@jeffhostetler.com> In-Reply-To: <20180713165621.52017-1-git@jeffhostetler.com> From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- t/t0420-structured-logging.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/t/t0420-structured-logging.sh b/t/t0420-structured-logging.sh index 37c7e83..2e06cd7 100755 --- a/t/t0420-structured-logging.sh +++ b/t/t0420-structured-logging.sh @@ -188,4 +188,37 @@ test_expect_success PERLJSON 'turn on index timers only' ' test_expect_code 1 grep "row\[0\]\.timers\.status\.untracked\.total_us" .git/info/sparse-checkout && + git config --local core.sparsecheckout true && + git config --local slog.aux foo,index,bar && + rm -f "$LOGFILE" && + + git checkout HEAD && + + grep -f key_cmd_exit "$LOGFILE" >event_exit && + + perl "$TEST_DIRECTORY"/t0420/parse_json.perl parsed_exit && + + grep "row\[0\]\.version\.slog 0" ][0] cache_nr + # row[0].aux.index[][1] 1 + # row[0].aux.index[][0] sparse_checkout_count + # row[0].aux.index[][1] 1 + # + # But do not assume values for and (in case the sorting changes + # or other "aux" fields are added later). + + grep "row\[0\]\.aux\.index\[.*\]\[0\] cache_nr"