aboutsummaryrefslogtreecommitdiff
path: root/rescached_test.go
AgeCommit message (Collapse)Author
2024-03-27all: comply with lintersShulhan
Fix the code as recommended by linters, for example using context for HTTP client request, using 0600 for file permission, using string concatenation instead of fmt, using "%w" for error, and reorder defer.
2024-03-21all: replace module "share" with "pakakeh.go"Shulhan
The module "share" has been moved to new repository at SourceHut and we rename it to make it more unique instead of common English words "share".
2022-07-11test: wait for server before running the testShulhan
On build.kilabit.info, 2 out 5 building this repository return an error dial tcp 127.0.0.1:5381: connect: connection refused This is due to server is not ready accepting connection while the test for client is already running.
2022-06-09all: add integration tests for HTTP API related to block.dShulhan
The test is conducted by running the server and call the HTTP API using the Client methods.
2019-07-05all: refactoring with latest update on dns packageShulhan
All the server core functionalities (caches and forwarding) now implemented inside "dns.Server". The main function of this package are for reading options from configuration file (or from command line options) and watching changes from system resolv.conf. There are also some major changes on configuration file. * "server.parent" option now use URI format instead of IP:PORT. This will allow parent name servers to be UDP, TCP, and/or DoH simultaneusly. * "server.doh.parent" and "server.parent.connection" are removed, redundant with new "server.parent" format. * "cache.threshold" is renamed to "cache.prune_threshold".
2019-03-02go.mod: update dependency github.com/shuLhan/share to v0.4.0Shulhan
The dns package provide more human readable when printing Question. Instead of printing query type in number, for example A record with "1", the Question stringer now print "A" instead.
2019-02-14all: remove caches requestShulhan
This minimize one queue in server but slowing down the process because each request will be handled sequentially.
2019-01-29rescached: add more unit test for some methodsShulhan
The unit test only for New, WritePID, LoadMasterDir, LoadHostsDir, and processRequest with UDP.
2019-01-19response: add unit test for all methodsShulhan