fix: report workspace status success
This commit is contained in:
@@ -67,6 +67,7 @@ class ToolResult(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class WorkspaceStatus(BaseModel):
|
class WorkspaceStatus(BaseModel):
|
||||||
|
ok: bool = True
|
||||||
workspace_id: str
|
workspace_id: str
|
||||||
provider: Literal["local-docker", "ssh-docker"]
|
provider: Literal["local-docker", "ssh-docker"]
|
||||||
container_name: str
|
container_name: str
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ def test_gateway_requires_service_key_and_signed_identity(settings, identity_jwt
|
|||||||
response = client.post("/v1/tools/list_files", headers=headers, json={"path": "src"})
|
response = client.post("/v1/tools/list_files", headers=headers, json={"path": "src"})
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.json()["output"] == "user-123:src"
|
assert response.json()["output"] == "user-123:src"
|
||||||
|
status = client.post("/v1/tools/workspace_status", headers=headers, json={})
|
||||||
|
assert status.status_code == 200
|
||||||
|
assert status.json()["ok"] is True
|
||||||
|
assert status.json()["state"] == "running"
|
||||||
listing = client.get("/v1/files", headers=headers, params={"path": "."})
|
listing = client.get("/v1/files", headers=headers, params={"path": "."})
|
||||||
assert listing.status_code == 200
|
assert listing.status_code == 200
|
||||||
assert listing.json()["entries"][0]["name"] == "报告.md"
|
assert listing.json()["entries"][0]["name"] == "报告.md"
|
||||||
|
|||||||
Reference in New Issue
Block a user