Unverified Commit ab4d8c2b authored by Lemon-miaow's avatar Lemon-miaow
Browse files

test(staticcheck): 删掉没人调用的 mustRead 和一次没被读的赋值

parent 66440460
Loading
Loading
Loading
Loading
+0 −9
Changes for internal/api/exports_test.go: 0 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -1111,15 +1111,6 @@ func (zeros) Read(p []byte) (int, error) {
	return len(p), nil
}

func mustRead(t *testing.T, r io.Reader) []byte {
	t.Helper()
	b, err := io.ReadAll(r)
	if err != nil {
		t.Fatal(err)
	}
	return b
}

// TestExportUploadPace: the Job's upload waits for the browser longer than the
// body-deadline grace, and then moves at the browser's pace, without being cut
// off; a body that stops moving for exportStall is.
+1 −1
Changes for internal/operator/stalepod_test.go: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ func TestSpecChangeReplacesAPodThatGaveUp(t *testing.T) {
	// The admin corrects the image; the StatefulSet takes the new template but,
	// the pod never having been ready, leaves the pod as it is.
	editImage(t, c, "registry.internal/felis/paper:fixed")
	s = at(time.Hour + time.Second)
	at(time.Hour + time.Second)
	if !podPresent(t, c) {
		t.Fatal("the pod was deleted before the StatefulSet had observed the new template")
	}