diff options
| author | Timo Weingärtner <timo@tiwe.de> | 2026-03-07 22:36:10 +0100 |
|---|---|---|
| committer | Timo Weingärtner <timo@tiwe.de> | 2026-03-07 22:36:10 +0100 |
| commit | 960aa108a9cd4ff31932653fdc847d492901a37b (patch) | |
| tree | 905386c7eb0a7d470ff90b8428f2a70f3327743e /tests | |
| parent | f47546025f34ff4294b7f6b3e672c521c8d2d3f5 (diff) | |
| parent | 8bd8f61f2ab2978a0a1bf7aa6f19a6352b9769c9 (diff) | |
| download | ssh-agent-filter-960aa108a9cd4ff31932653fdc847d492901a37b.tar.gz | |
Merge tag '0.5.3' into debian
0.5.3
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 ) @@ -38,7 +43,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 () { @@ -97,7 +102,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 |
