Multiple set request are being sent in dns-1 tests #3

Closed
opened 2019-12-30 01:56:30 +00:00 by Ghost · 3 comments

You are testing multiple domains in dns-1 tests, e.g. foo.oshnix.org and *.foo.oshnix.org. However, dns host for them is the same (_90-acme-challenge-44.foo.oshnix.org). This leads to multiple TXT records being created on this domain. As a result, the plugin cannot choose which record to return (first is being chosen) and the test fails.

I think that this test should be changed to either test the domains one-by-one (perform sync set, get, remove for each domain) or wildcard domain should be different from the another one existing in test, e.g. *.bar.oshnix.org.

If you think that my plugin should pass an existing tests, please, describe the correct behavior in the situation mentioned above.

You are testing multiple domains in `dns-1` tests, e.g. `foo.oshnix.org` and `*.foo.oshnix.org`. However, dns host for them is the same (`_90-acme-challenge-44.foo.oshnix.org`). This leads to multiple TXT records being created on this domain. As a result, the plugin cannot choose which record to return (first is being chosen) and the test fails. I think that this test should be changed to either test the domains one-by-one (perform sync set, get, remove for each domain) or wildcard domain should be different from the another one existing in test, e.g. `*.bar.oshnix.org`. If you think that my plugin should pass an existing tests, please, describe the correct behavior in the situation mentioned above.
Owner

Yes, it should test multiple domains and the DNS host should NOT be the same (for different wildcards).

Take a look at one of these as an example of what each function does:

Which DNS provider are you building for?

Yes, it _should_ test multiple domains and the DNS host should NOT be the same (for different wildcards). Take a look at one of these as an example of what each function does: * name dot com: https://git.rootprojects.org/root/acme-dns-01-namedotcom.js/src/branch/master/lib/index.js * namecheap: https://git.rootprojects.org/root/acme-dns-01-namecheap.js/src/branch/master/lib/index.js * digital ocean: https://git.rootprojects.org/root/acme-dns-01-digitalocean.js/src/branch/master/lib/index.js Which DNS provider are you building for?
Owner

Note: In the case of foo.oshnix.org and *.foo.oshnix.org it is correct that you do have two records for the same hostname. The DNS name server should send ALL records and the client will choose the correct one.

As far as when to delete which, the delete function calls with the value, so you can check that way. If your DNS host does not have an ID by which to distinguish between records... setTimeout? I know that's an anti-pattern, but if their API is broken that may be the best you can do.

The order that the test runs is exactly what it should be.

Note: In the case of `foo.oshnix.org` and `*.foo.oshnix.org` it is _correct_ that you do have two records for the same hostname. The DNS name server should send ALL records and the client will choose the correct one. As far as when to delete which, the delete function calls with the value, so you can check that way. If your DNS host does not have an ID by which to distinguish between records... `setTimeout`? I know that's an anti-pattern, but if their API is broken that may be the best you can do. The order that the test runs is exactly what it should be.
Author

Thanks a lot for your hint, I have forgotten that during get request we do have a text of the record we would like to get. I've used it to filter the values and my solution have finally started to pass all the tests.
I do have a couple of questions, though, but I suppose that gitea issues isn't the best place for them.
Thank you once more for your help.

Thanks a lot for your hint, I have forgotten that during `get` request we do have a text of the record we would like to get. I've used it to filter the values and my solution have finally started to pass all the tests. I do have a couple of questions, though, but I suppose that gitea issues isn't the best place for them. Thank you once more for your help.
Ghost closed this issue 2019-12-31 07:15:01 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 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/acme-challenge-test.js#3
No description provided.