feat: 首页改版与 uv / 镜像配置收敛,精简任务数据结构
- 页头只保留品牌与操作图标,三栏改为 1:2:1、容器最宽 1320 - 任务卡片:状态标签移入标题行并缩小,隐藏任务标识,操作行贴内容底边 - uv 配置弹窗:删掉与首页重复的状态条,三段配置改成标签页 - 镜像源:弹窗去掉默认镜像汇总,首页卡片改为展示默认镜像与运行时注入的变量 - 后端:迁移合并为单一基线 0001_init,删掉未生效的 concurrency_policy / retry_*, 运行触发只剩 schedule / manual;contracts、前端生成类型、README / PLAN 同步
This commit is contained in:
@@ -131,6 +131,30 @@ async fn directory_listing_endpoint_returns_subdirectories() {
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn directory_listing_endpoint_includes_files_when_requested() {
|
||||
let (app, temp_dir) = test_app().await;
|
||||
let tools = temp_dir.path().join("tools");
|
||||
fs::create_dir_all(tools.join("bin")).expect("bin directory should be created");
|
||||
fs::write(tools.join("uv.exe"), "x").expect("file should be written");
|
||||
|
||||
let uri = format!(
|
||||
"/api/v1/system/directories?path={}&include_files=true",
|
||||
encode_query_path(&tools)
|
||||
);
|
||||
let (status, body) = get_json(&app, &uri).await;
|
||||
|
||||
assert_eq!(status, StatusCode::OK);
|
||||
let entries = body["entries"]
|
||||
.as_array()
|
||||
.expect("entries should be an array");
|
||||
assert_eq!(entries.len(), 2);
|
||||
assert_eq!(entries[0]["name"], "bin");
|
||||
assert_eq!(entries[0]["is_dir"], true);
|
||||
assert_eq!(entries[1]["name"], "uv.exe");
|
||||
assert_eq!(entries[1]["is_dir"], false);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn directory_listing_endpoint_rejects_relative_paths() {
|
||||
let (app, _temp_dir) = test_app().await;
|
||||
|
||||
Reference in New Issue
Block a user