From ab4d8c2bf730a751f841ce31ec82139a7b3aa778 Mon Sep 17 00:00:00 2001 From: Lemon-miaow Date: Tue, 29 Sep 2026 03:25:26 +0800 Subject: [PATCH] =?UTF-8?q?test(staticcheck):=20=E5=88=A0=E6=8E=89?= =?UTF-8?q?=E6=B2=A1=E4=BA=BA=E8=B0=83=E7=94=A8=E7=9A=84=20mustRead=20?= =?UTF-8?q?=E5=92=8C=E4=B8=80=E6=AC=A1=E6=B2=A1=E8=A2=AB=E8=AF=BB=E7=9A=84?= =?UTF-8?q?=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/api/exports_test.go | 9 --------- internal/operator/stalepod_test.go | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/internal/api/exports_test.go b/internal/api/exports_test.go index 5e38a52..6cb5f0c 100644 --- a/internal/api/exports_test.go +++ b/internal/api/exports_test.go @@ -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. diff --git a/internal/operator/stalepod_test.go b/internal/operator/stalepod_test.go index 37e1552..046ea39 100644 --- a/internal/operator/stalepod_test.go +++ b/internal/operator/stalepod_test.go @@ -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") }