forked from TrueCloudLab/rclone
Catch nil from List() in tests
This commit is contained in:
parent
51b24a1dc6
commit
492362ec7d
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,10 @@ func (is *Items) Done(t *testing.T) {
|
||||||
func CheckListingWithPrecision(t *testing.T, f fs.Fs, items []Item, precision time.Duration) {
|
func CheckListingWithPrecision(t *testing.T, f fs.Fs, items []Item, precision time.Duration) {
|
||||||
is := NewItems(items)
|
is := NewItems(items)
|
||||||
for obj := range f.List() {
|
for obj := range f.List() {
|
||||||
|
if obj == nil {
|
||||||
|
t.Errorf("Unexpected nil in List()")
|
||||||
|
continue
|
||||||
|
}
|
||||||
is.Find(t, obj, precision)
|
is.Find(t, obj, precision)
|
||||||
}
|
}
|
||||||
is.Done(t)
|
is.Done(t)
|
||||||
|
|
Loading…
Reference in a new issue