tests: add bats tests for testing CLI on arbitrary Boundary deployments (#614)

This commit is contained in:
Jeff Malnick authored and GitHub committed 2020-10-12 10:26:26 -07:00
1 parent 3db9a07ace
commit 90e1dbe444
10 files changed
+308

No files matched your search

@@ -0,0 +1,20 @@
function create_account() {
boundary accounts create password -login-name $1 -password $DEFAULT_PASSWORD -auth-method-id $DEFAULT_AMPW
}
function read_account() {
boundary accounts read -id $1
}
function delete_account() {
boundary accounts delete -id $1
}
function list_accounts() {
boundary accounts list -auth-method-id $DEFAULT_AMPW -format json
}
function account_id() {
local acct=$1
strip $(list_accounts | jq -c ".[] | select(.attributes.login_name | contains(\"$acct\")) | .[\"id\"]")
}