Commit Graph

32 Commits

Author SHA1 Message Date
ThinkChaos 9d65b9395d feat: add `queryLog.ignore.sudn` option to ignore SUDN responses 2024-04-05 15:32:09 -04:00
ThinkChaos 3fcf379df7 refactor(util): make `LogOnError` get the log from a `Context` 2024-03-19 19:10:07 -04:00
Ben McHone 178dbb740e fix: Parse time from file names in the local system timezone 2024-02-06 09:46:43 -05:00
ThinkChaos c5cc1120a9 squash: remove `TmpFolder.ReadDir` and partially revert querylog test 2023-12-01 15:53:11 -05:00
ThinkChaos 8c7b89cbb3 refactor(tests): remove `TmpFile.Error` to centralize error checks 2023-12-01 15:53:11 -05:00
ThinkChaos 891d0fba74 refactor(tests): move `DeferCleanup` into helper functions 2023-12-01 15:53:11 -05:00
ThinkChaos d52c598546
fix(tests): properly silence log output (#1259)
* fix(tests): properly silence log output

Using `init` allows it to also work for benchmarks.
And `log.Silence` was sometimes getting overridden by `log.init`.

* squash: fix(server): don't setup the logger again
2023-11-19 17:51:49 -05:00
Dimitri Herzog 33ea933015
refactor: pass context for goroutine shutdown (#1187) 2023-10-07 16:21:40 -04:00
Dimitri Herzog d9e91da686
chore: improve database writer tests (#1189) 2023-10-06 11:26:35 +02:00
ThinkChaos 8a93e4500c style: fix all existing lint errors 2023-07-07 09:16:20 -04:00
Kwitsch 9abeaeddea
Added gofumpt (#805)
* fix linter errors

* added gofumpt

* Makefile cleanup

* gofumpt run

* Update Makefile

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>

* go mod tidy

* fmt + lint

* go mod tidy

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
2022-12-26 22:11:45 +01:00
ThinkChaos 45d96a2f49
style: fix lint (#781) 2022-12-03 11:40:07 +01:00
Dimitri Herzog d2ca5a4a6f
feat: reduce bulk size in database writer (#733) (#762)
* feat: reduce bulk size in database writer (#733)

* test: added tests with sqlmock to cover the database migration
2022-12-02 22:17:41 +01:00
Dimitri Herzog 2b49c2048f
feat(querylog): define which information should be logged (#765) (#766) 2022-11-26 22:12:56 +01:00
Kwitsch d4813a6448
feat(queryLog): log instance hostname to distinguish log entries in multi-instance installation(#319) (#756)
* added hostname to util

* added HostnameString

* some leftover debug output?

* added hostname to querylog

* add optional volume mounts to documentation

* changed documentation
2022-11-24 21:39:58 +01:00
Kwitsch fd93f67899
feat: new parameter "StartStrategy" (#566) (#636)
Blocky should start resolving DNS traffic as soon as possible
2022-09-03 22:12:07 +02:00
Dimitri Herzog 421807fc22
chore: update golangci-lint (#631) 2022-08-19 22:04:35 +02:00
Kwitsch 9c80a5f9a9
test: use dynamic unit test data (#624) 2022-08-06 22:44:26 +02:00
Kwitsch 51ef9ea77f
test: fix flaky test(537) - second hunt (#610)
* go test -> ginkgo

* removed flake-attempts as suggested

* added FlakeAttempts to flaky test definition

* as net.DNSError qualifies as net.Error check and correct the response

* fix in downloader.go resolves flaky tests

* unwrap maybe?

* excluede DownloadFile from funlen linter

* use eventually on io operations in file_writer_test

* file_writer_test flaky fixes

* fix linter errors

* Serve test reversed go routine

* matcher fix

* serve test rework 2

* DeferCleanup tmp files

* fixed some flakiness in resolver tests

* go mod tidy

* fixed linter errors

* JustAfterEach -> DeferCleanup

* changed close to defer

* moved unwrap from downloader to test

* fix linter error

* propper cleanup in "should return error"

Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
2022-08-01 22:27:11 +02:00
Dimitri Herzog e4445f05f6
Add primary key to the query log table #585 (#609) 2022-07-28 23:08:37 +02:00
Dimitri Herzog a4b89537db
update golangci-lint (#510)
* update golangci-lint

* enable gomnd linter

* enable asciicheck linter

* enable bidichk linter

* enable durationcheck linter

* enable errchkjson linter

* enable errorlint linter

* enable exhaustive linter

* enable gomoddirectives linter

* enable gomodguard guard

* enable grouper linter

* enable grouper and ifshort linters

* enable importas linter

* enable makezero linter

* enable nestif linter

* enable nilerr linter

* enable nilnil linter

* enable nlreturn linter

* enable nolintlint linter

* enable predeclared linter

* enable sqlclosecheck linter

* enable tenv linter

* enable wastedassign linter
2022-05-10 09:09:50 +02:00
ThinkChaos 62c7816ab3
Support of DoH/DoT as bootstrap DNS (#485) 2022-04-22 22:12:35 +02:00
ThinkChaos 27c8cbf2b7
Update to gingko v2 (#447) 2022-03-03 11:27:27 +01:00
FileGo c176b02ac9
Support Postgresql database for query log (#348)
Co-authored-by: Dimitri Herzog <dimitri.herzog@gmail.com>
2022-01-07 21:42:06 +01:00
Dimitri Herzog d7bf373b52 Replace all sleeps in tests with "eventually" from gomega (#379) 2021-12-22 22:21:04 +01:00
Dimitri Herzog e882fa0a39
Fallback when using mysql or file as query log (#318) (#336) 2021-11-11 08:52:21 +01:00
Dimitri Herzog fe79b989d6 added test 2021-11-10 22:31:54 +01:00
FileGo 98cf484517
Option to disable the query log (#333) 2021-11-10 21:54:32 +01:00
Dimitri Herzog 598849efd3 added missing field in query log (#291) 2021-09-25 22:36:18 +02:00
Dimitri Herzog e6ca89607a write database entries async in bulk 2021-09-13 22:06:21 +02:00
Dimitri Herzog ee8f041938 refactoring: generate enums 2021-09-11 21:31:03 +02:00
Dimitri Herzog dca82623a1 Storing the query log in the database (#258) 2021-09-08 21:38:34 +02:00