Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 3s
- Add .gitea/workflows/ci.yml: Gitea Actions workflow for PR/push CI - Add scripts/smoke_test.py: fast smoke tests (<30s) for core imports and CLI entrypoints - Add tests/test_green_path_e2e.py: bare green-path e2e — terminal echo test - Total CI runtime target: <5 minutes - No API keys required for smoke/e2e stages Closes #145 /assign @bezalel
19 lines
650 B
Python
19 lines
650 B
Python
"""Bare green-path E2E — one happy-path tool call cycle.
|
|
|
|
Exercises the terminal tool directly and verifies the response structure.
|
|
No API keys required. Runtime target: < 10 seconds.
|
|
"""
|
|
|
|
import json
|
|
|
|
from tools.terminal_tool import terminal_tool
|
|
|
|
|
|
def test_terminal_echo_green_path() -> None:
|
|
"""terminal('echo hello') -> verify response contains 'hello' and exit_code 0."""
|
|
result = terminal_tool(command="echo hello", timeout=10)
|
|
data = json.loads(result)
|
|
|
|
assert data["exit_code"] == 0, f"Expected exit_code 0, got {data['exit_code']}"
|
|
assert "hello" in data["output"], f"Expected 'hello' in output, got: {data['output']}"
|