mirror of https://github.com/restic/restic.git
Merge pull request #1580 from ifedorenko/tests-errors-cause
Use errors.Cause in backend TestListCancel
This commit is contained in:
commit
d62a664bb7
|
@ -381,7 +381,7 @@ func (s *Suite) TestListCancel(t *testing.T) {
|
|||
return nil
|
||||
})
|
||||
|
||||
if err != context.Canceled {
|
||||
if errors.Cause(err) != context.Canceled {
|
||||
t.Fatalf("expected error not found, want %v, got %v", context.Canceled, err)
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ func (s *Suite) TestListCancel(t *testing.T) {
|
|||
return nil
|
||||
})
|
||||
|
||||
if err != context.Canceled {
|
||||
if errors.Cause(err) != context.Canceled {
|
||||
t.Fatalf("expected error not found, want %v, got %v", context.Canceled, err)
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ func (s *Suite) TestListCancel(t *testing.T) {
|
|||
return nil
|
||||
})
|
||||
|
||||
if err != context.DeadlineExceeded {
|
||||
if errors.Cause(err) != context.DeadlineExceeded {
|
||||
t.Fatalf("expected error not found, want %#v, got %#v", context.DeadlineExceeded, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue