Commit graph

21 commits

Author SHA1 Message Date
hhftechnologies
d8f5b44d56 Refactor defers, switches, and small fixes
Replace direct defers that ignored returned errors with explicit defer func() { _ = ... }() and use blank-assignment for Setenv/RemoveAll/Close to satisfy error-checking and ensure closures run. Convert several if-else chains to switch for clarity (status filter, test server path matching), switch strings.Replace to strings.ReplaceAll, and normalize some error/log message casing. These changes are minor refactors across handlers, services, database and tests to improve lint compliance and readability.
2026-04-16 08:02:03 +05:30
hhftechnologies
9d0b772458 Improve error handling, tests, and defaults
Some checks are pending
Build and Push Docker Image / build-and-push (push) Waiting to run
Tests / Run Tests (push) Waiting to run
Tests / Lint (push) Waiting to run
Tests / Build (push) Blocked by required conditions
Add robust error checks and helpers, improve transaction safety, and refine default templates handling.

- Add api/handlers/test_helpers_test.go with mustUnmarshalResponse and mustScan helpers and update many handler tests to use them or to check json.Unmarshal errors to fail fast.
- Replace direct DB Scan calls in tests with mustScan or explicit error checks to surface query failures.
- Improve transaction rollback handling across codepaths (config handlers, database migrations, transaction utils, CertGenerator) to log rollback errors and avoid silent failures.
- Make WithTransaction/WithTimeoutTransaction/BatchTransaction formatting consistent and add panic-safe rollback logging.
- In main, log a warning instead of ignoring EnsureDefaultDataSources errors.
- Add/cleanup various helper blank assignments and small refactors in services (config_proxy, config_generator) and switch tests to shared response writers (writeJSONResponse/writeResponseBody) where applicable.
- Large cleanup and enhancements in config/defaults.go to preserve string formatting for YAML templates, ensure special fields are quoted/preserved, and tidy whitespace/formatting.

These changes improve test reliability, make DB/tx failures more visible, and ensure default template YAML preserves important string values.
2026-04-15 20:00:48 +05:30
hhftechnologies
d194ccd2da remove-IPWhiteList-deprecated 2026-01-21 19:27:23 +05:30
hhftechnologies
4c76756593 updated-test-files-mtlsbugsfix 2026-01-17 13:12:44 +05:30
hhftechnologies
c1a7d607b4 bug-deleting-services-middleware 2026-01-13 17:48:15 +05:30
hhftechnologies
7905f719d3 Update templates.yaml 2026-01-12 01:22:49 +05:30
hhftechnologies
56d33a7560 update-ui 2025-12-31 21:53:32 +05:30
hhftechnologies
73fdfc4a4a services-int 2025-05-05 12:35:30 +05:30
hhftechnologies
c18a80ab1b Update templates.yaml 2025-04-18 20:18:28 +05:30
hhftechnologies
973477ce55 update 2025-04-18 14:55:04 +05:30
hhftechnologies
968abebbf6 update 2025-04-18 10:02:03 +05:30
hhftechnologies
1f26c91dfb update 2025-04-18 09:17:51 +05:30
hhftechnologies
24168fc1b9 update 2025-04-17 23:09:24 +05:30
hhftechnologies
5c3bd12892 update 2025-04-17 22:09:01 +05:30
hhftechnologies
4ebe03bfb0 update 2025-04-17 17:51:13 +05:30
hhftechnologies
762b53bb14 update 2025-04-17 14:08:34 +05:30
hhftechnologies
809e266f59 update 2025-04-14 20:59:57 +05:30
hhftechnologies
64a7cf330d update 2025-04-14 20:29:30 +05:30
hhftechnologies
950cb7c88a update 2025-04-14 18:27:36 +05:30
hhftechnologies
00c5119991 update 2025-04-14 13:56:16 +05:30
hhftechnologies
f6e0ce616a Initial commit 2025-04-13 22:54:56 +05:30