mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-06-05 23:03:40 +00:00
fbb13aa32f
internal/converter: 57.1% -> 98.4%. Added 18 cases covering ConvertKFTrayToKPortal (happy path, missing input, malformed JSON, unwritable output, multi-entry, file mode 0600), GetConversionSummary (happy path, missing/malformed input, empty array, dedup counters), and convertToKPortal edge cases (empty input, zero ports, empty WorkloadType, sort order, alias preservation, tcp/udp/empty protocol variants). internal/httplog: 55.7% -> 95.7%. Added 17 tests using httptest for loggingTransport.RoundTrip (GET/POST, filter-path bypass, header redaction at the integration layer, backend-down, nil bodies, request counter monotonicity) and direct unit tests for readBodyLimited (empty, small, exact-at-limit, truncated, large pool-branch, zero maxSize).