Houmgaor
|
9c5cc559c7
|
test(signserver): increase test coverage from 1.5% to 45.2%
Add comprehensive tests for signserver package using sqlmock for
database function testing:
- Server lifecycle tests (Start, Shutdown, acceptClients)
- Connection handling tests (handleConnection, multiple connections)
- Database function tests (getCharactersForUser, getLastCID,
getUserRights, checkToken, registerToken, deleteCharacter,
newUserChara, registerDBAccount, getReturnExpiry,
getFriendsForCharacters, getGuildmatesForCharacters)
- Session struct and packet handling tests
All tests pass with race detection enabled.
|
2026-02-03 00:19:48 +01:00 |
|
Houmgaor
|
dad6a23bba
|
test: improve test coverage from 11% to 20%
Add comprehensive tests across multiple packages:
- mhfpacket: Add tests for 300+ packet opcodes, system packets,
MHF packets, and detailed parsing tests (6.4% -> 38.8%)
- timeserver: Add tests for all time functions (0% -> 97.4%)
- deltacomp: Add edge case tests for compression functions
- entranceserver: Add server creation tests
- binpacket: Add mail notify panic test
- config: Add Mode.String() tests
- signserver: Expand server tests
|
2026-02-02 11:02:52 +01:00 |
|
Houmgaor
|
e929346bf3
|
test: add unit tests for core packages
Add comprehensive test coverage for:
- common/token: token generation and RNG tests
- common/stringsupport: string encoding, CSV operations
- common/byteframe: binary read/write operations
- common/mhfcourse: course/subscription logic
- network/crypt_packet: packet header parsing
- network/binpacket: binary packet round-trips
- network/mhfpacket: packet interface and opcode mapping
- config: configuration struct and loading
- server/entranceserver: response building
- server/signserver: response ID constants
- server/signv2server: HTTP endpoint validation
- server/channelserver: session, semaphore, and handler tests
All tests pass with race detector enabled.
|
2026-01-30 00:19:27 +01:00 |
|