diff --git a/tests/test_tool_shell.sh b/tests/test_tool_shell.sh index a8e847f..4eccac9 100755 --- a/tests/test_tool_shell.sh +++ b/tests/test_tool_shell.sh @@ -41,6 +41,15 @@ timeout 5s "${DRHARNESS}" -F chat3.json -n -m "This is a test" -t run_dangerous_ echo "PASS: tool_shell" +tool_call run_dangerous_shell '{"command":"printf \"test\"; sleep 10 &","timeout_seconds":1}' >> background_task_test.txt +be_done 'done' >> background_task_test.txt + +# If we hit the timeout of the timeout utility then we fail +timeout 5s "${DRHARNESS}" -F background_task_test.json -n -m "This is a test" -t run_dangerous_shell -d < "background_task_test.txt" + +echo "PASS: background_task_test" + + seq 1 1044 > long_file tool_call run_dangerous_shell '{"command":"cat long_file"}' >> mock_responses4.txt