From 22b5dfdaf10e5f681684b5a7666ae4702f80d33d Mon Sep 17 00:00:00 2001 From: Nils Goroll Date: Sun, 25 Jan 2026 19:36:02 +0100 Subject: [PATCH] chore: use `require.Error()` over `require.Errorf()` (#11037) Related to #11035, this test case used `require.Errorf()` where it could use `require.Error()` to make it clear that this is not a case of confusion with `require.ErrorContains()` The other cases in the same function already use `require.Error()`, so this clearly looks like a consistency glitch. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11037 Reviewed-by: Gusted Co-authored-by: Nils Goroll Co-committed-by: Nils Goroll --- modules/storage/helper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/storage/helper_test.go b/modules/storage/helper_test.go index dd30c9b8ac..ae32700c09 100644 --- a/modules/storage/helper_test.go +++ b/modules/storage/helper_test.go @@ -40,7 +40,7 @@ func Test_discardStorage(t *testing.T) { { got, err := tt.URL("path", "name", nil) assert.Nil(t, got) - require.Errorf(t, err, string(tt)) + require.Error(t, err, string(tt)) } { err := tt.IterateObjects("", func(_ string, _ Object) error { return nil })