test(cli/targets): Add test case for default client port
This commit is contained in:
2 files changed
+21
-1
No files matched your search
@@ -30,6 +30,11 @@ function create_tcp_target_with_addr() {
|
||||
-format json
|
||||
}
|
||||
|
||||
function update_tcp_target() {
|
||||
boundary targets \
|
||||
update tcp $@
|
||||
}
|
||||
|
||||
function read_target() {
|
||||
boundary targets read -id $1 -format json
|
||||
}
|
||||
|
||||
@@ -90,6 +90,21 @@ load _target_host_sources
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "boundary/target/client_port: admin user set can set a client port" {
|
||||
local id=$(target_id_from_name $DEFAULT_P_ID $TGT_NAME)
|
||||
run update_tcp_target -id $id -default-client-port 1234
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
run read_target $id
|
||||
[ "$status" -eq 0 ]
|
||||
got=$(echo "$output")
|
||||
|
||||
echo "$got"
|
||||
run field_eq "$got" ".item.attributes.default_client_port" "1234"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "boundary/target: default user can delete target" {
|
||||
local id=$(target_id_from_name $DEFAULT_P_ID $TGT_NAME)
|
||||
run delete_target $id
|
||||
@@ -134,4 +149,4 @@ load _target_host_sources
|
||||
[ "$status" -eq 0 ]
|
||||
run update_address $id "localhost"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user