From 2bf68614de1620ef12f086d9e86d5c8b334bf32d Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 23 Jan 2025 21:54:41 +0100 Subject: dashboard/app: test coverage /file link 1. Init coveragedb client once and propagate it through context to enable mocking. 2. Always init coverage handlers. It simplifies testing. 3. Read webGit and coveragedb client from ctx to make it mockable. 4. Use int for file line number and int64 for merged coverage. 5. Add tests. --- dashboard/app/config.go | 1 + 1 file changed, 1 insertion(+) (limited to 'dashboard/app/config.go') diff --git a/dashboard/app/config.go b/dashboard/app/config.go index 6d173cb19..c71d09d8e 100644 --- a/dashboard/app/config.go +++ b/dashboard/app/config.go @@ -425,6 +425,7 @@ func installConfig(cfg *GlobalConfig) { initAPIHandlers() initKcidb() initBatchProcessors() + initCoverageDB() } var contextConfigKey = "Updated config (to be used during tests). Use only in tests!" -- cgit mrf-deployment