aboutsummaryrefslogtreecommitdiff
path: root/environment_test.go
AgeCommit message (Collapse)Author
2023-07-27[wip] cmd/rescached: add telemetry using questdbdev-telemetryShulhan
The telemetry collect the Go runtime/metrics and forward it to questdb instance in localhost.
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.
2022-05-22all: export and rename the hostsBlock type to BlockdShulhan
In the Environment, we have a field HostsBlocks that reference an unexported type hostsFile. In order for any package to be able to use this field, we need to export this type. While at it, we rename the type from hostsBlock to Blockd to make it simple and consistent with name.
2022-05-22all: change the test debug level from 2 to 1Shulhan
Since we move and watch doc files, running "make dev" with debug level set to 2 add more noise due to logs from converting .adoc files.
2022-04-19all: always call Environment initShulhan
This is to make sure that all required fields that are empty in the configuration initialized to its default values.
2022-04-19all: move the rescached.cfg for test under _test directoryShulhan
2022-04-19all: add option to set the base directoryShulhan
Previously, running an instance of rescached assume that all configurations and cache are located in /etc/rescached and /var/cache/rescached. It possible that we may want to use different base directory (or $PREFIX, in the auto tools terms), for example "/opt/rescached" or as showed in the "dev" task in the Makefile, we use "_test" as base directory for running test instance. This changes also fix an error when loading hosts file from non-existant hosts.d directory.
2022-04-19all: remove malwaredomainlist.com from provider of hosts blockShulhan
The URL and contents from this provider is now empty and has not been updated.
2022-04-19all: refactoring the hosts blocks format and locationShulhan
This changes add new directory called "block.d" under rescached. This directory contains hosts file fetched from URL defined in hosts block configuration. In this way, we did not mixed between user created hosts file and external hosts file. In the configuration file, we changes the hosts block format from single line hosts_block = <URL> into subsection with dynamic name, [block.d "<name>"] name = <name> url = <URL>
2022-03-15all: change the rescached license to GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2021-12-19all: refactoring Server initializationShulhan
Previously, we initialize the rescached Server by passing the path to configuration file and initialize the environment inside the server. This commit changes it to pass the instance of Environment. The idea is to allow creating and running rescached Server without creating configuration file first.
2021-07-13go.mod: update to latest share moduleShulhan
Changes affected by update, * lib/http: changes on Endpoint.Call function signature * lib/http: changes on CORS configuration * lib/test: changes on the Assert function signature
2020-07-26all: rename Options to environmentShulhan
While at it, unexport it.