forked from rook/rook
Update the unit test for ExecuteCommandWithTimeout(). This unit failed a CI run. This seems to have been a race condition where the previous `cat` command was returning quickly enough that it was available to the `select` statment at the same time as the timeout. Resolve this issue by replacing the `cat` command with `sleep`, which will be guaranteed to take longer to return than the timeout, ensuring this race doesn't happen. While working on the test, I also notice that the 30 second timeouts for other tests would be too long in the event the commands hang for any reason, so lower these to help ensure the CI won't time out due to unforeseen events. Also add a missing unit test to ensure error returns (via `false` command) without timeouts are properly returned. Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>