Commit Graph

18 Commits

Author SHA1 Message Date
Houmgaor
e7eab936a9 test: increase total coverage from 46.1% to 50.5%
- Fix duplicate test declarations across coverage2, misc, mercenary, event files
- Fix signserver TestHandlePacketDELETE timeout (multi-write pipe deadlock)
- Fix entranceserver build error (invalid -1 for uint16 port)
- Add handlers_reserve_test.go covering all 56 reserve handler stubs
- Add handlers_coverage3_test.go with 115+ handler tests
- Add handlers_register_test.go with 55 Raviente register/load tests
- Add handlers_coverage_test.go, signserver, entranceserver, usercheck tests
2026-02-08 18:42:55 +01:00
Houmgaor
dbc3b21827 test: increase test coverage across multiple packages
Add comprehensive tests for:
- network: CryptConn encryption connection tests
- signserver: character and member struct validation
- entranceserver: encryption roundtrip, server config tests
- channelserver: stage creation, object IDs, quest membership

All tests pass with race detector enabled.
2026-02-02 16:48:57 +01:00
Houmgaor
42018621c3 fix: array bound crashes on clans. 2026-02-02 16:27:49 +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
db3e0bccc7 test: improve test coverage for mhfpacket, channelserver, and server packages
Add comprehensive tests for:
- Pure time functions in channelserver (sys_time_test.go)
- Stage-related packet parsing (msg_sys_stage_test.go)
- Acquire packet family parsing (msg_mhf_acquire_test.go)
- Extended mhfpacket tests for login, logout, and stage packets
- Entrance server makeHeader structure and checksum tests
- SignV2 server request/response JSON structure tests
2026-02-01 23:28:19 +01:00
Houmgaor
fb14a78dbd fix(entrance): read clan member limit from config instead of hardcoded value
Cherry-picked from main (7d760bd) with conflict resolution.
Uses the last entry in ClanMemberLimits config array to determine
the maximum clan member count sent to clients.
2026-01-30 01:11:09 +01:00
Houmgaor
982393daf4 test: add unit tests for cherry-pick impacted handlers
Add comprehensive tests documenting current behavior before applying
fixes from main branch. Tests cover:

- Cafe item PointCost parsing (uint32 vs uint16 for different client modes)
- Guild poogie outfit unlock calculation bug (math.Pow issue)
- Guild manage right nil pointer condition (&& vs || logic)
- InfoGuild applicant GR field size for <G10 clients
- Stage binary wait infinite loop risk (no timeout)
- Entrance server hardcoded clan member limit
2026-01-30 01:01:21 +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
Houmgaor
a992c5a603 refactor(format): automated formatting with go fmt. 2025-11-24 17:59:41 +01:00
wish
0caf610d33 rework logging code 2023-03-09 22:11:55 +11:00
wish
dcab41a6c7 rework logging code 2023-03-09 22:05:32 +11:00
wish
e811dd1274 initial time fix 2023-03-04 21:43:10 +11:00
wish
747f21c4db workaround for localhost connections 2023-02-25 16:12:51 +11:00
wish
9fc26405bb defer closing entranceserver connections 2022-10-18 12:03:12 +11:00
wish
7d3aa8c5b9 use default currentplayers integer on fail 2022-10-12 05:19:48 +11:00
wish
f9e9aaa303 use default season integer on fail 2022-10-12 05:15:40 +11:00
wish
e9cc5cc3e2 parse host as FQDN or IP 2022-08-04 23:52:13 +10:00
wish
2c0e7a5267 repository cleanup 2022-07-29 03:25:23 +10:00