From 664ad8e38fd0f077e1fba5e69325fb3a36a75e19 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sun, 18 Apr 2021 00:03:31 +0200 Subject: add a test for cert signature dissection --- tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests b/tests index 0e7e1e7..d222e7e 100755 --- a/tests +++ b/tests @@ -97,7 +97,8 @@ test_confirmation () { EOT chmod +x "$SHUNIT_TMPDIR/sap" assertTrue 'export SSH_ASKPASS="$SHUNIT_TMPDIR/sap"; sign_key_with_key_filtered key0 key1 --comment-confirmed key1' - assertSame "Something behind the ssh-agent-filter requested use of the key named 'key1'." "$(head -n1 "$SHUNIT_TMPDIR/sap_out")" + assertSame "Something behind the ssh-agent-filter requested use of the key named 'key1'." "$(sed 1!d "$SHUNIT_TMPDIR/sap_out")" + assertSame "The request is for a certificate signature on key " "$(sed '2!d;s/AAAA.*$//' "$SHUNIT_TMPDIR/sap_out")" } . shunit2 -- cgit v1.2.3 From 19304907075d2cc69805dae81493f28483be305b Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Thu, 5 Mar 2026 19:22:39 +0100 Subject: tests: work around https://github.com/kward/shunit2/issues/112 --- tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests b/tests index d222e7e..415be38 100755 --- a/tests +++ b/tests @@ -38,7 +38,7 @@ oneTimeSetUp () { } oneTimeTearDown () { - [ -z "$SSH_AGENT_PID" ] || kill "$SSH_AGENT_PID" + [ -z "$SSH_AGENT_PID" ] || { kill "$SSH_AGENT_PID"; unset SSH_AGENT_PID; } } with_saf_in_tmp () { -- cgit v1.2.3 From 60b84f1d9e64254c817bfa1b9a54a1a723af0712 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sat, 7 Mar 2026 18:06:40 +0100 Subject: tests: use empty $HOME --- tests | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests b/tests index 415be38..f01c70b 100755 --- a/tests +++ b/tests @@ -22,6 +22,11 @@ oneTimeSetUp () { set -e + # openssh tools require an at least existing $HOME and + # are probably sensitive to it, create an empty one + mkdir "${SHUNIT_TMPDIR}/home" + export HOME="${SHUNIT_TMPDIR}/home" + # prepare keys ( cd "$SHUNIT_TMPDIR"; ssh-keygen -q -t ed25519 -N '' -C key0 -f key0 ) ( cd "$SHUNIT_TMPDIR"; ssh-keygen -q -t ed25519 -N '' -C key1 -f key1 ) -- cgit v1.2.3