refactor(downloader): remove opts parameter from Resolve (#1595)

This commit is contained in:
Levi authored and GitHub committed 2026-10-19 21:40:57 +08:00
1 parent 5462b14705
commit de65149b29
45 files changed
+1589 -384

No files matched your search

+5 -5
View File
@@ -55,8 +55,7 @@ var (
},
}
resolveReq = &model.ResolveTask{
Req: taskReq,
Opts: createOpts,
Req: taskReq,
}
createReq = &model.CreateTask{
Req: taskReq,
@@ -105,7 +104,8 @@ func TestCreateTask(t *testing.T) {
})
taskId := httpRequestCheckOk[string](http.MethodPost, "/api/v1/tasks", &model.CreateTask{
Rid: resp.ID,
Rid: resp.ID,
Opts: createOpts,
})
if taskId == "" {
t.Fatal("create task failed")
@@ -295,7 +295,7 @@ func TestPatchTask(t *testing.T) {
time.Sleep(time.Millisecond * 100)
// Patch the task with new labels
patchReq := &model.ResolveTask{
patchReq := &model.PatchTask{
Req: &base.Request{
Labels: map[string]string{
"patched": "true",
@@ -322,7 +322,7 @@ func TestPatchTask(t *testing.T) {
func TestPatchTaskNotFound(t *testing.T) {
doTest(func() {
// Try to patch a non-existent task
patchReq := &model.ResolveTask{
patchReq := &model.PatchTask{
Req: &base.Request{
Labels: map[string]string{
"test": "value",