tests: ensure default user can connect to default target and ensure created target has intended host sets (#646)
This commit is contained in:
1 parent
20822e28f8
commit
7f48e2edc6
2 files changed
+31
No files matched your search
@@ -34,3 +34,21 @@ function target_id() {
|
||||
local name=$2
|
||||
strip $(list_targets $sid | jq -c ".[] | select(.name | contains(\"$name\")) | .[\"id\"]")
|
||||
}
|
||||
|
||||
function target_host_set_ids() {
|
||||
local tid=$1
|
||||
boundary targets read -id $tid -format json | jq '.host_sets[].id'
|
||||
}
|
||||
|
||||
function target_has_host_set_id() {
|
||||
local tid=$1
|
||||
local hsid=$2
|
||||
|
||||
ids=$(target_host_set_ids $tid)
|
||||
for id in $ids; do
|
||||
if [ $(strip "$id") == "$hsid" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
Reference in new issue
Block a user