Add two more classes of error Fatal and NoRetry

These are for remotes to signal that they have a fatal error and don't
want to continue (eg cap exceeded) or that a particular file shouldn't
be retried for some reason.
This commit is contained in:
Nick Craig-Wood
2016-07-04 13:45:52 +01:00
parent 018fe80bcb
commit 28f4061892
4 changed files with 113 additions and 13 deletions
+3 -3
View File
@@ -361,7 +361,7 @@ func Test_callRetry(t *testing.T) {
if err == errFoo {
t.Errorf("err didn't want %v got %v", errFoo, err)
}
_, ok := err.(fs.Retry)
_, ok := err.(fs.Retrier)
if !ok {
t.Errorf("didn't return a retry error")
}
@@ -375,7 +375,7 @@ func TestCall(t *testing.T) {
if dp.called != 20 {
t.Errorf("called want %d got %d", 20, dp.called)
}
_, ok := err.(fs.Retry)
_, ok := err.(fs.Retrier)
if !ok {
t.Errorf("didn't return a retry error")
}
@@ -389,7 +389,7 @@ func TestCallNoRetry(t *testing.T) {
if dp.called != 1 {
t.Errorf("called want %d got %d", 1, dp.called)
}
_, ok := err.(fs.Retry)
_, ok := err.(fs.Retrier)
if !ok {
t.Errorf("didn't return a retry error")
}