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 <gusted@noreply.codeberg.org>
Co-authored-by: Nils Goroll <nils.goroll@uplex.de>
Co-committed-by: Nils Goroll <nils.goroll@uplex.de>
This commit is contained in:
Nils Goroll 2026-01-25 19:36:02 +01:00 committed by Gusted
parent 54017ee5c4
commit 22b5dfdaf1

View file

@ -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 })