}
}
+ if matchAllFilters == nil {
+ // Not filtering by UUID at all; just query the local
+ // cluster.
+ _, err := fn(ctx, conn.cluster.ClusterID, conn.local, opts)
+ return err
+ }
+
// Collate UUIDs in matchAllFilters by remote cluster ID --
// e.g., todoByRemote["aaaaa"]["aaaaa-4zz18-000000000000000"]
// will be true -- and count the total number of UUIDs we're
if cl.MaxPageSize > 0 && len(resp.Items) >= cl.MaxPageSize {
break
}
+ if options.Limit >= 0 && len(resp.Items) >= options.Limit {
+ break
+ }
if cl.matchFilters(c, options.Filters) {
resp.Items = append(resp.Items, c)
}
expectStatus int
}
+func (s *CollectionListSuite) TestCollectionListNoUUIDFilters(c *check.C) {
+ s.test(c, listTrial{
+ count: "none",
+ limit: 1,
+ expectUUIDs: []string{s.uuids[0][0]},
+ expectCalls: []int{1, 0, 0},
+ })
+}
+
func (s *CollectionListSuite) TestCollectionListOneLocal(c *check.C) {
s.test(c, listTrial{
count: "none",
continue
}
opts := calls[0].Options.(arvados.ListOptions)
- c.Check(opts.Limit, check.Equals, -1)
+ c.Check(opts.Limit, check.Equals, trial.limit)
}
}