Browse code

client/task_list_test: use gotest.tools-style asserts

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Paweł Gronowski authored on 2025/05/17 02:14:48
Showing 1 changed files
... ...
@@ -84,11 +84,7 @@ func TestTaskList(t *testing.T) {
84 84
 		}
85 85
 
86 86
 		tasks, err := client.TaskList(context.Background(), listCase.options)
87
-		if err != nil {
88
-			t.Fatal(err)
89
-		}
90
-		if len(tasks) != 2 {
91
-			t.Fatalf("expected 2 tasks, got %v", tasks)
92
-		}
87
+		assert.NilError(t, err)
88
+		assert.Check(t, is.Len(tasks, 2))
93 89
 	}
94 90
 }