Files
threshold/internal/tests/cli/boundary/_connect.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

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}}
}