Several shared modules have no unit test coverage at all:
Module
File
Tests?
TCP transport
transport_tcp.c
❌ None
SSH transport
transport_ssh.c
❌ None
TLS transport
transport_tls.c
❌ None
Protocol I/O
protocol.c
❌ None
Data buffer
data.c
❌ None (covered implicitly)
File operations
file.c
❌ None (covered implicitly)
Metadata
metadata.c
❌ None
The tests/runner.c only runs tests for: queue, array_list, shared_utils, chunk, config, compression, scanner, and delta.
This is a significant gap — the transport layer (TCP/SSH/TLS) and network protocol I/O have zero dedicated tests, making regressions in network handling difficult to catch.
Suggested Fix: Add test files:
tests/test_transport_tcp.c — test server_create, client_connect, basic send/receive
tests/test_transport_ssh.c — test parse_remote_dest
tests/test_transport_tls.c — test tls_global_init, SSL context creation
tests/test_protocol.c — test send/receive round-trips for all data types
tests/test_file.c — unit test file_save_to_disk, file_create, file_destroy
tests/test_metadata.c — test metadata_to_buf/metadata_from_buf round-trips
Severity: medium
Several shared modules have **no unit test coverage** at all:
| Module | File | Tests? |
|--------|------|--------|
| TCP transport | `transport_tcp.c` | ❌ None |
| SSH transport | `transport_ssh.c` | ❌ None |
| TLS transport | `transport_tls.c` | ❌ None |
| Protocol I/O | `protocol.c` | ❌ None |
| Data buffer | `data.c` | ❌ None (covered implicitly) |
| File operations | `file.c` | ❌ None (covered implicitly) |
| Metadata | `metadata.c` | ❌ None |
The `tests/runner.c` only runs tests for: queue, array_list, shared_utils, chunk, config, compression, scanner, and delta.
This is a significant gap — the transport layer (TCP/SSH/TLS) and network protocol I/O have zero dedicated tests, making regressions in network handling difficult to catch.
**Suggested Fix:** Add test files:
- `tests/test_transport_tcp.c` — test server_create, client_connect, basic send/receive
- `tests/test_transport_ssh.c` — test parse_remote_dest
- `tests/test_transport_tls.c` — test tls_global_init, SSL context creation
- `tests/test_protocol.c` — test send/receive round-trips for all data types
- `tests/test_file.c` — unit test file_save_to_disk, file_create, file_destroy
- `tests/test_metadata.c` — test metadata_to_buf/metadata_from_buf round-trips
**Severity:** medium
Fixed in PR #148 and earlier PRs. Unit tests for all three transport modules (TCP, SSH, TLS) exist in tests/test_transport_tcp.c, tests/test_transport_ssh.c, tests/test_transport_tls.c. Protocol tests exist in tests/test_protocol.c. All are registered in tests/runner.c.
Fixed in PR #148 and earlier PRs. Unit tests for all three transport modules (TCP, SSH, TLS) exist in tests/test_transport_tcp.c, tests/test_transport_ssh.c, tests/test_transport_tls.c. Protocol tests exist in tests/test_protocol.c. All are registered in tests/runner.c.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Several shared modules have no unit test coverage at all:
transport_tcp.ctransport_ssh.ctransport_tls.cprotocol.cdata.cfile.cmetadata.cThe
tests/runner.conly runs tests for: queue, array_list, shared_utils, chunk, config, compression, scanner, and delta.This is a significant gap — the transport layer (TCP/SSH/TLS) and network protocol I/O have zero dedicated tests, making regressions in network handling difficult to catch.
Suggested Fix: Add test files:
tests/test_transport_tcp.c— test server_create, client_connect, basic send/receivetests/test_transport_ssh.c— test parse_remote_desttests/test_transport_tls.c— test tls_global_init, SSL context creationtests/test_protocol.c— test send/receive round-trips for all data typestests/test_file.c— unit test file_save_to_disk, file_create, file_destroytests/test_metadata.c— test metadata_to_buf/metadata_from_buf round-tripsSeverity: medium
Fixed in PR #148 and earlier PRs. Unit tests for all three transport modules (TCP, SSH, TLS) exist in tests/test_transport_tcp.c, tests/test_transport_ssh.c, tests/test_transport_tls.c. Protocol tests exist in tests/test_protocol.c. All are registered in tests/runner.c.