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

+24
View File
@@ -0,0 +1,24 @@
function create_user() {
boundary users create -scope-id global -name $1 -description 'test user'
}
function read_user() {
boundary users read -id $1
}
function delete_user() {
boundary users delete -id $1
}
function list_users() {
boundary users list -format json
}
function assoc_user_acct() {
boundary users add-accounts -account $1 -id $2
}
function user_id() {
local user=$1
strip $(list_users | jq -c ".[] | select(.name | contains(\"$user\")) | .[\"id\"]")
}