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).
6 lines
224 B
Bash
6 lines
224 B
Bash
function connect_nc() {
|
|
local id=$1
|
|
# Note: When this command returns, the session immediately goes into a "canceling" state
|
|
echo "foo" | boundary connect -exec nc -target-id $id -- {{boundary.ip}} {{boundary.port}}
|
|
}
|