inspec/test/fixtures/profiles/timeouts/controls/inline-timeout.rb
Clinton Wolfe 8df0fb0814 Functional tests for command resource timeout
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-03-29 21:46:25 -04:00

11 lines
341 B
Ruby

control "timeout-test-01" do
# Do something that will timeout, with inline timeout option
describe command("sleep 10; echo oops", timeout: 2) do
its("stdout") { should be_empty }
end
# Validate that the connection still works after a timeout
describe command("echo hello") do
its("exit_status") { should cmp 0 }
end
end