"manager.find" implementation - how much is needed? #2

Open
opened 2020-09-10 05:06:14 +00:00 by Ghost · 1 comment

I'm trying to write a manager which is backed by Amazon DynamoDB, and use that manager with greenlock-express.

I've got the basics working, but from trying to read through the greenlock base code, it seems that it only ever calls .find({}) on the manager type. I.e. it never tries to filter by subject.

So I implemented a simple find function that will return everything.

However the manager tests are failing because it expects find({ subject: siteAltname }) and find({ servernames: [siteAltname], altnames: [siteAltname] })
to be implemented.

Are they truly required? Under what circumstances will they be used?

I'm trying to write a manager which is backed by Amazon DynamoDB, and use that manager with greenlock-express. I've got the basics working, but from trying to read through the greenlock base code, it seems that it only ever calls `.find({})` on the manager type. I.e. it never tries to filter by subject. So I implemented a simple `find` function that will return everything. However the manager tests are failing because it expects `find({ subject: siteAltname })` and `find({ servernames: [siteAltname], altnames: [siteAltname] })` to be implemented. Are they truly required? Under what circumstances will they be used?
Author

I also noticed that the test outputs:

console.info("PASS:  find({ servernames, renewBefore })");

I.e. it implies that renewBefore was tested, but in fact renewBefore is never set in the test.

It's pretty confusing what actually needs to be implemented in this function.

I also noticed that the test outputs: ```js console.info("PASS: find({ servernames, renewBefore })"); ``` I.e. it implies that `renewBefore` was tested, but in fact `renewBefore` is never set in the test. It's pretty confusing what actually needs to be implemented in this function.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: root/greenlock-manager-test.js#2
No description provided.