feat(secrets): Reading from stdin and reproducible secret list(#614)
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #614
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
Co-authored-by: p4u1 <p4u1_f4u1@riseup.net>
Co-committed-by: p4u1 <p4u1_f4u1@riseup.net>
This commit is contained in:
2025-08-27 15:37:43 +00:00
committed by p4u1
parent b86cd2e85f
commit 7c31e4dc45
2 changed files with 85 additions and 26 deletions

View File

@ -206,10 +206,10 @@ teardown(){
run $ABRA app secret insert "$TEST_APP_DOMAIN" bar
assert_failure
run $ABRA app secret insert "$TEST_APP_DOMAIN" bar baz
run $ABRA app secret insert "$TEST_APP_DOMAIN" bar baz --no-input
assert_failure
run $ABRA app secret insert "$TEST_APP_DOMAIN" test_pass_one v1 -n
run bash -c "echo foo | $ABRA app secret insert $TEST_APP_DOMAIN bar baz -f"
assert_failure
}
@ -251,6 +251,20 @@ teardown(){
assert_output --partial 'true'
}
@test "insert: create secret from stdin" {
run $ABRA app secret ls "$TEST_APP_DOMAIN"
assert_success
assert_output --partial 'false'
run bash -c "echo foo | $ABRA app secret insert $TEST_APP_DOMAIN test_pass_one v1"
assert_success
assert_output --partial 'successfully stored on server'
run $ABRA app secret ls "$TEST_APP_DOMAIN"
assert_success
assert_output --partial 'true'
}
@test "rm: validate arguments" {
run $ABRA app secret rm
assert_failure
@ -343,6 +357,12 @@ teardown(){
| jq -r ".[] | select(.name==\"test_pass_two\") | .version"'
assert_success
assert_output --partial 'v1'
# Can always expect the secret at this position
run bash -c '$ABRA app secret ls "$TEST_APP_DOMAIN" --machine \
| jq -r ".[1] | .name"'
assert_success
assert_output --partial 'test_pass_two'
}
@test "ls: bail if unstaged changes and no --chaos" {