2
0
镜像自地址 https://git.coolaj86.com/coolaj86/greenlock-manager-test.js.git 已同步 2025-05-09 02:36:33 +00:00

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

开启中
由 Ghost 于 2020-09-10 05:06:14 +00:00 打开 · 1 评论

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?
作者

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.
登录 并参与到对话中。
未选择标签
1 名参与者
通知
到期时间
未设置到期时间。
依赖工单

没有设置依赖项。

参考:root/greenlock-manager-test.js#2
没有提供说明。