Repository navigation
Add regression test for bash command endpoint fix (#866) - #881
Conversation
This test verifies that the correct /api/bash/start_bash_command endpoint is used when executing bash commands. This is a regression test for issue #866 where the incorrect endpoint /api/bash/execute_bash_command was being used, causing command execution to timeout. The fix was implemented in PR #871, and this test ensures that the correct endpoint continues to be used and prevents future regressions. Co-authored-by: openhands <openhands@all-hands.dev>
|
@OpenHands please review the PR description of this PR, the diff against main and tests/cross/test_remote_conversation_live_server.py. We should add a REAL test in the test remote conversation live server for this bash command end point and check the actual ouput of the command |
|
I'm on it! xingyaoww can track my progress at all-hands.dev |
This test validates the /api/bash/start_bash_command endpoint works correctly end-to-end by executing real bash commands through a live FastAPI server and verifying the actual command output. Unlike the existing mock-based unit test, this integration test: - Starts a real FastAPI server with all bash endpoints - Creates a RemoteWorkspace pointing to the live server - Executes actual bash commands - Verifies the real output matches expectations This provides comprehensive regression protection for issue #866 where bash execution was broken due to using the wrong endpoint URL. Co-authored-by: openhands <openhands@all-hands.dev>
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
SummaryI've successfully added a real integration test for the bash command endpoint as requested. The changes have been committed and pushed to the PR. What Was AddedNew Test: This integration test:
Key Differences from Existing Test
Test Results✅ All tests pass (both existing and new) The PR now provides comprehensive regression protection for issue #866 with both mock-based unit tests and real end-to-end integration tests. |
Fixed ruff lint error by using the correct class name RemoteWorkspaceMixinHelper instead of TestRemoteWorkspaceMixin in the bash endpoint unit test. Co-authored-by: openhands <openhands@all-hands.dev>
…enHands#881) Co-authored-by: openhands <openhands@all-hands.dev>
…enHands#881) Co-authored-by: openhands <openhands@all-hands.dev>
Description
This PR adds a comprehensive regression test for the fix implemented in PR #871, which resolved issue #866 where bash command execution was broken due to using the incorrect API endpoint.
Changes Made
test_start_bash_command_endpoint_used()totests/sdk/workspace/remote/test_remote_workspace_mixin.py/api/bash/start_bash_commandendpoint is used instead of the incorrect/api/bash/execute_bash_commandendpointBackground
Issue #866 reported that bash execution was broken, with commands timing out after 30 seconds. The root cause was that the code was calling the non-existent
/api/bash/execute_bash_commandendpoint instead of the correct/api/bash/start_bash_commandendpoint.The fix in PR #871 corrected the endpoint URL, allowing bash commands to execute properly. This test ensures that:
Testing
Related Issues
Closes #866
This test provides regression protection for the fix implemented in #871.
@xingyaoww can click here to continue refining the PR
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
golang:1.21-bookwormeclipse-temurin:17-jdknikolaik/python-nodejs:python3.12-nodejs22Pull (multi-arch manifest)
Run
All tags pushed for this build
The
7c42fd7tag is a multi-arch manifest (amd64/arm64); your client pulls the right arch automatically.