tests: add scopes CLI tests (#645)
This commit is contained in:
1 parent
70e696a446
commit
3c1670c0d0
4 files changed
+102
-1
No files matched your search
@@ -0,0 +1,29 @@
|
||||
function create_scope() {
|
||||
local parent=$1
|
||||
local name=$2
|
||||
echo "name $name scope $parent"
|
||||
boundary scopes create -name $name -scope-id $parent
|
||||
}
|
||||
|
||||
function read_scope() {
|
||||
local sid=$1
|
||||
|
||||
boundary scopes read -id $sid -format json
|
||||
}
|
||||
|
||||
function delete_scope() {
|
||||
local sid=$1
|
||||
|
||||
boundary scopes delete -id $sid
|
||||
}
|
||||
|
||||
function list_scopes() {
|
||||
boundary scopes list -scope-id $1 -format json
|
||||
}
|
||||
|
||||
function scope_id() {
|
||||
local name=$1
|
||||
local sid=$2
|
||||
|
||||
strip $(list_scopes $sid | jq -c ".[] | select(.name | contains(\"$name\")) | .[\"id\"]")
|
||||
}
|
||||
Reference in new issue
Block a user