From ae52b8c077d13c3c92abf4ab24ea92ed2d265ebb Mon Sep 17 00:00:00 2001 From: Brian Majewski Date: Wed, 24 Jun 2026 13:06:57 -0700 Subject: [PATCH] test: restore bootstrap-path + which-legacy coverage (EGB-283) Co-Authored-By: Claude Opus 4.8 (1M context) --- test/recipients.bats | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/recipients.bats b/test/recipients.bats index 6c73759..433d46a 100644 --- a/test/recipients.bats +++ b/test/recipients.bats @@ -134,6 +134,9 @@ make_second_identity() { init_with_remote create_project_dir myproj run "$SECRETS_BIN" push + # Simulate a legacy store (no recipients.txt) so recipients add triggers the + # bootstrap branch (if [ ! -e "$RECIPIENTS_FILE" ]) rather than the append path. + rm -f "$SECRETS_DIR/recipients.txt" make_second_identity run "$SECRETS_BIN" recipients add "$BOB_PUB" --name bob [ "$status" -eq 0 ] @@ -255,3 +258,12 @@ make_second_identity() { [[ "$output" == *"recipients: 2"* ]] || false [[ "$output" == *"bob"* ]] || false } + +@test "which reports single-key for a legacy store" { + init_with_remote + rm -f "$SECRETS_DIR/recipients.txt" + create_project_dir myproj + run "$SECRETS_BIN" which + [ "$status" -eq 0 ] + [[ "$output" == *"recipients: single-key"* ]] || false +}