Ignore "not exist" errors for swift backend tests
This commit is contained in:
parent
5b1e4df177
commit
2a1633621b
3 changed files with 29 additions and 7 deletions
|
@ -20,8 +20,21 @@ func newSwiftTestSuite(t testing.TB) *test.Suite {
|
|||
// do not use excessive data
|
||||
MinimalData: true,
|
||||
|
||||
// wait for removals for at least 60s
|
||||
WaitForDelayedRemoval: 60 * time.Second,
|
||||
// wait for removals for at least 5m
|
||||
WaitForDelayedRemoval: 5 * time.Minute,
|
||||
|
||||
ErrorHandler: func(t testing.TB, be restic.Backend, err error) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if be.IsNotExist(err) {
|
||||
t.Logf("swift: ignoring error %v", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
return err
|
||||
},
|
||||
|
||||
// NewConfig returns a config for a new temporary backend that will be used in tests.
|
||||
NewConfig: func() (interface{}, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue