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_host() {
local name=$1
local addr=$2
boundary hosts create static -name $name -address $addr
}
function read_host() {
boundary hosts read -id $1
}
function delete_host() {
boundary hosts delete -id $1
}
function list_hosts() {
boundary hosts list -scope-id $1 -format json
}
function host_id() {
local sid=$1
local name=$2
strip $(list_hosts $sid | jq -c ".[] | select(.name | contains(\"$name\")) | .[\"id\"]")
}