mirror of
https://github.com/octoleo/restic.git
synced 2025-01-22 22:58:26 +00:00
Use errors.Cause in backend TestListCancel
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
This commit is contained in:
parent
d6212ee2d9
commit
abc4027083
@ -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…
x
Reference in New Issue
Block a user