mirror of
https://github.com/rclone/rclone.git
synced 2025-02-16 18:41:54 +01:00
drive: fix tests for backend query command
The tests assumed that there would be only one match, but on the integration test server there are multiple matches due to failed test runs.
This commit is contained in:
parent
27496fb26d
commit
7ce60a47e8
@ -551,9 +551,11 @@ func (f *Fs) InternalTestQuery(t *testing.T) {
|
|||||||
|
|
||||||
results, err := f.query(ctx, fmt.Sprintf("%strashed=false and name='%s'", parent, escapedItem))
|
results, err := f.query(ctx, fmt.Sprintf("%strashed=false and name='%s'", parent, escapedItem))
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Len(t, results, 1)
|
require.True(t, len(results) > 0)
|
||||||
assert.Len(t, results[0].Id, 33)
|
for _, result := range results {
|
||||||
assert.Equal(t, results[0].Name, item)
|
assert.True(t, len(result.Id) > 0)
|
||||||
|
assert.Equal(t, result.Name, item)
|
||||||
|
}
|
||||||
parent = fmt.Sprintf("'%s' in parents and ", results[0].Id)
|
parent = fmt.Sprintf("'%s' in parents and ", results[0].Id)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user