Skip to content

Commit

Permalink
test(cli): Add tests for vault-ssh-certificate credential library
Browse files Browse the repository at this point in the history
This adds tests for updating specific fields of the credential library.
  • Loading branch information
tmessi committed Feb 1, 2023
1 parent 44d1626 commit 6546fcf
Show file tree
Hide file tree
Showing 3 changed files with 424 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/tests/cli/boundary/_credential_libraries.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ function create_vault_ssh_certificate_library() {
create vault-ssh-certificate $@
}

function update_vault_ssh_certificate_library() {
boundary credential-libraries \
update vault-ssh-certificate $@
}

function create_vault_generic_library() {
boundary credential-libraries \
create vault-generic $@
Expand Down
8 changes: 8 additions & 0 deletions internal/tests/cli/boundary/_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ function has_status_code() {
diag() {
echo "$@" | sed -e 's/^/# /' >&3 ;
}

function field_eq() {
local json=$1
local field=$2
local expected=$3
echo "checking $field == $expected in $json"
echo "$json" | jq -e "$field == $expected"
}
Loading

0 comments on commit 6546fcf

Please sign in to comment.