Refactor connection listing for tests (#1224)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-05-14 15:57:15 -04:00
1 parent ea611b4f6a
commit b47b71d26c
3 files changed
+13 -18

No files matched your search

+2 -1
View File
@@ -52,8 +52,9 @@ func NewRepository(r db.Reader, w db.Writer, kms *kms.Kms, opt ...Option) (*Repo
// list will return a listing of resources and honor the WithLimit option or the
// repo defaultLimit. Supports WithOrder option.
func (r *Repository) list(ctx context.Context, resources interface{}, where string, args []interface{}, opts options) error {
func (r *Repository) list(ctx context.Context, resources interface{}, where string, args []interface{}, opt ...Option) error {
const op = "session.(Repository).list"
opts := getOpts(opt...)
limit := r.defaultLimit
var dbOpts []db.Option
if opts.withLimit != 0 {