summaryrefslogtreecommitdiff
path: root/test/support
AgeCommit message (Collapse)Author
2018-02-05feature: enamble wkd lookupfeature/web-key-directoryAzul
fixes #1
2017-09-23style: more rubocop fixesAzul
2017-09-23style: rubocop mostly auto-correctAzul
2017-09-22fiX: tests need different names, warningsAzul
2017-07-24fix: #3 handle domains without A-recordAzul
If a domain only has an mx record but no A record it will trigger a ConnectionError when attempting the nicknym key lookup. We need to detect and handle this in the http adapter already because once the exception is handled by Celluloid our actor will be terminated. So now we allow for handing a rescue option to the adapter with a string that is checked for inclusion in the error message. If the string is found the exception will be caught and the adapter returns nil. We only make use of this when checking the availability of nicknym so far. That should be the only http request going out.
2017-07-21fix: filedescriptor leak from http_adaptersAzul
Now we reuse a single adapter for all requests triggered by an incoming request. Then we .terminate the adapter. Includes a regression test.
2016-10-02silence Celluloid.logger in testsAzul
Introduced CelluloidTest as a test class for all tests that depend on Celluloid being up and running.
2016-09-30change default adapter to CelluloidHttpAzul
Turns out without this nickserver will not respond to multiple concurrent requests.
2016-09-24use plain http.rb rather than celluloid i/oAzul
Turns out http.rb does not support celluloid i/o andymore and we were not making use of it anyway. Here's what https://github.com/httprb/http/wiki/Thread-Safety says: (NOTE: this gem previously supported Celluloid::IO, but that support was removed to add the current timeout backend. It may be added back in a future version) So now we have a plain http.rb adapter and use that as the default. This prevents actors from crashing in the adapter (as we don't have any).
2016-09-21feature: activate nicknym lookupAzul
2016-09-12test: separate remote tests into own directoryAzul
Dropped the webmock dependency. We have our own http adapter. So we can stub that to inject a mock. As an added bonus this does not mess with other http requests. Also wrote down testing strategy. Not completely implemented yet.
2016-09-12[wip] nicknym source query implementedAzul
Also changed Nickserver::Response to not include the status code. This may be okay for error responses but in most cases we want to have a parsable message and not some status code prepended to it.
2016-09-10refactor: remove global require in test_helperAzul
require all the things we depend upon where we depend upon them.
2016-08-31wip: key lookup by address via leaps nicknymAzul
I added a RequestHandler that uses Nicknym::Source - but that has not been implemented yet.
2016-08-30feature: keep trying if no Host header givenAzul
So far we would error out if no host was specified in the config or the request. It's true that we can't do local lookup if we don't know our own domain. However we can still use HKP. In the future we will query leaps own API for other providers. If the host was not set in the initial request we might even proxy a request to ourselves. Providing the Host header will prevent an infinite loop in that case.