mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 09:21:13 -05:00
fix(test): TestGitAttributeCheckerError must allow broken pipe
Early cancelation can lead to two kinds of error. Either canceled or
broken pipe, depending on when the goroutine stops.
Fixes: forgejo/forgejo#6012
(cherry picked from commit b9697f5227
)
This commit is contained in:
parent
ee753450a7
commit
3e967fa4a0
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ func TestGitAttributeCheckerError(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
_, err = ac.CheckPath("i-am-a-python.p")
|
_, err = ac.CheckPath("i-am-a-python.p")
|
||||||
require.ErrorIs(t, err, context.Canceled)
|
require.Error(t, err)
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("Cancelled/DuringRun", func(t *testing.T) {
|
t.Run("Cancelled/DuringRun", func(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue