Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Steadmon <steadmon@google.com>2020-11-12 02:29:32 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-12 05:26:53 +0300
commit829594677c3cd02f7d88b3cd3c72ad06f68faa14 (patch)
treee3ef49e00362cf7da17faf7711760ad55d8e3c70 /t/t5705-session-id-in-capabilities.sh
parent1e905bbc008dfc3c0ffe14b55bd920e188e51b4e (diff)
upload-pack, serve: log received client session ID
When upload-pack (protocol v0/v1) or a protocol v2 server receives a session-id capability from a client, log the received session ID via a trace2 data event. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5705-session-id-in-capabilities.sh')
-rwxr-xr-xt/t5705-session-id-in-capabilities.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/t/t5705-session-id-in-capabilities.sh b/t/t5705-session-id-in-capabilities.sh
index 9e782f4413..afa2159657 100755
--- a/t/t5705-session-id-in-capabilities.sh
+++ b/t/t5705-session-id-in-capabilities.sh
@@ -17,11 +17,14 @@ test_expect_success 'setup repos for session ID capability tests' '
for PROTO in 0 1 2
do
test_expect_success "session IDs not advertised by default (fetch v${PROTO})" '
- test_when_finished "rm -rf local tr2-client-events" &&
+ test_when_finished "rm -rf local tr2-client-events tr2-server-events" &&
cp -r "$LOCAL_PRISTINE" local &&
GIT_TRACE2_EVENT="$(pwd)/tr2-client-events" \
- git -c protocol.version=$PROTO -C local fetch origin &&
- test -z "$(grep \"key\":\"server-sid\" tr2-client-events)"
+ git -c protocol.version=$PROTO -C local fetch \
+ --upload-pack "GIT_TRACE2_EVENT=\"$(pwd)/tr2-server-events\" git-upload-pack" \
+ origin &&
+ test -z "$(grep \"key\":\"server-sid\" tr2-client-events)" &&
+ test -z "$(grep \"key\":\"client-sid\" tr2-server-events)"
'
test_expect_success "session IDs not advertised by default (push v${PROTO})" '
@@ -43,11 +46,14 @@ test_expect_success 'enable SID advertisement' '
for PROTO in 0 1 2
do
test_expect_success "session IDs advertised (fetch v${PROTO})" '
- test_when_finished "rm -rf local tr2-client-events" &&
+ test_when_finished "rm -rf local tr2-client-events tr2-server-events" &&
cp -r "$LOCAL_PRISTINE" local &&
GIT_TRACE2_EVENT="$(pwd)/tr2-client-events" \
- git -c protocol.version=$PROTO -C local fetch origin &&
- grep \"key\":\"server-sid\" tr2-client-events
+ git -c protocol.version=$PROTO -C local fetch \
+ --upload-pack "GIT_TRACE2_EVENT=\"$(pwd)/tr2-server-events\" git-upload-pack" \
+ origin &&
+ grep \"key\":\"server-sid\" tr2-client-events &&
+ grep \"key\":\"client-sid\" tr2-server-events
'
test_expect_success "session IDs advertised (push v${PROTO})" '