Files
threshold/internal/tests/cli/boundary/_sessions.bash
T
Michael Li 16e90ddd35 fix(bats): Fix flakiness in sessions.bats tests (#2537)
The sessions.bats tests were seeing some flaky behavior when listing sessions but not getting the expected amount back. This is due to the connect_nc command that is currently used, which will immediately set the session to be "canceled" once it returns. This can cause subsequent operations to  get unexpected results (sometimes, listing sessions would return an empty list if the created sessions go to a "terminated" state).
2022-10-17 10:27:35 -04:00

18 lines
382 B
Bash

load _authorized_actions
function list_sessions_include_terminated() {
boundary sessions list -scope-id $1 -include-terminated -format json
}
function count_sessions_include_terminated() {
list_sessions_include_terminated $1 | jq '.items | length'
}
function cancel_session() {
boundary sessions cancel -id $1
}
function read_session() {
boundary sessions read -id $1
}