feat: secrets recipients list (EGB-283)
This commit is contained in:
parent
14cf86fba9
commit
649aa78063
2 changed files with 72 additions and 0 deletions
|
|
@ -55,3 +55,24 @@ make_second_identity() {
|
|||
[ "$status" -ne 0 ]
|
||||
[[ "$output" == *"symlink"* ]] || false
|
||||
}
|
||||
|
||||
@test "recipients list on a legacy store shows the single derived key" {
|
||||
init_with_remote
|
||||
run "$SECRETS_BIN" recipients list
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"single-key"* ]] || false
|
||||
STORE_PUB=$(age-keygen -y "$SECRETS_DIR/key.txt")
|
||||
[[ "$output" == *"$STORE_PUB"* ]] || false
|
||||
}
|
||||
|
||||
@test "recipients list shows names and keys from recipients.txt" {
|
||||
init_with_remote
|
||||
make_second_identity
|
||||
STORE_PUB=$(age-keygen -y "$SECRETS_DIR/key.txt")
|
||||
printf '# alice\n%s\n# bob\n%s\n' "$STORE_PUB" "$BOB_PUB" > "$SECRETS_DIR/recipients.txt"
|
||||
run "$SECRETS_BIN" recipients list
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"recipients: 2"* ]] || false
|
||||
[[ "$output" == *"alice"* ]] || false
|
||||
[[ "$output" == *"bob"* ]] || false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue