Commit Graph

85 Commits

Author SHA1 Message Date
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
0e2502c9dc test: add PacketID and core packet tests, expand stringstack coverage
- Add network/packetid_test.go with tests for PacketID type, constants,
  String() method, ranges, uniqueness, and sequential verification
- Add network/mhfpacket/msg_sys_core_test.go with round-trip tests for
  MsgSysAck (including large payloads), MsgSysNop, and MsgSysEnd
- Expand common/stringstack/stringstack_test.go with Lock/Unlock tests
  achieving 100% coverage
2026-02-01 23:36:18 +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
f83761c0b1 fix(test): initialize ErupeConfig in cafe item tests
Required after cherry-picking 3d0114c which added RealClientMode check.
2026-01-30 01:16:00 +01:00
Houmgaor
e095c5a5ca fix(cafe): read PointCost as uint16 for G1-G5.2 clients
Cherry-picked from main (3d0114c) with conflict resolution.
Pre-G6 clients send PointCost as uint16, not uint32.
2026-01-30 01:10:34 +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
64cc285fd8 doc: inline code documentation. 2025-11-24 18:41:37 +01:00
Houmgaor
a992c5a603 refactor(format): automated formatting with go fmt. 2025-11-24 17:59:41 +01:00
Houmgaor
c8c0dae8fe test: imports basic tests, all passing. 2025-11-09 12:36:56 +01:00
wish
107eddfea5 stub interception map packets 2023-03-27 21:29:23 +11:00
wish
bcb71536ec initial rights v4 concept 2023-03-11 23:17:14 +11:00
wish
29cf7add11 rework netcafe course activation 2023-03-11 16:26:16 +11:00
wish
051f2d2a4d parse GetRyoudama correctly 2023-03-11 00:55:28 +11:00
wish
d92270a249 fix PostTinyBin parsing 2023-03-11 00:55:23 +11:00
wish
d5dc15fc93 implement guild semaphore locking 2023-03-09 17:31:43 +11:00
wish
bef11ce82e support more courses 2023-02-28 18:18:22 +11:00
wish
dfe4998649 implement box gacha 2023-02-18 15:57:17 +11:00
wish
0fcacc24a0 implement stepup gacha, fix unfulfilled rewards 2023-02-18 12:36:17 +11:00
wish
f3995d3c74 Merge branch 'main' into feature/gacha-enum 2023-02-13 22:28:19 +11:00
wish
e98259a11a move various packet handlers 2023-02-13 22:27:07 +11:00
wish
091a8cd3da move caravan event handlers 2023-02-13 22:27:01 +11:00
wish
c37755f7c3 further decode merc packets 2023-01-29 14:40:27 +11:00
wish
1382e99fc6 further decode merc packets 2023-01-29 12:22:07 +11:00
wish
753d215211 fix reading and cancelling rasta contracts 2023-01-29 02:18:23 +11:00
wish
bd42b5d0c2 various changes 2023-01-29 01:27:46 +11:00
wish
15d2273724 Merge branch 'main' into feature/gacha-enum 2023-01-23 22:55:22 +11:00
wish
6be1e0c927 handle stampcard progression 2023-01-22 22:43:34 +11:00
wish
7bede20f38 track etc points 2023-01-22 15:16:00 +11:00
wish
7d4559b589 variable changes 2023-01-15 21:36:50 +11:00
wish
341276c0ff implement normal gacha functionality 2023-01-15 19:55:08 +11:00
wish
2d96bcf9c7 stub InfoTournament 2023-01-08 18:39:44 +11:00
wish
d21ecf2b31 shop enumeration pass 2 2022-11-21 11:42:19 +11:00
wish
9103debe99 shop enumeration first pass 2022-11-21 09:27:29 +11:00
wish
6c3be9c32e decode and support screenshot sharing 2022-11-07 00:31:42 +11:00
wish
a99fa78fc2 change recurring course names 2022-11-04 18:02:41 +11:00
wish
cace0bb829 Merge branch 'main' into feature/quest-enum 2022-11-02 23:31:57 +11:00
wish
5bb9637db8 rights v3.1 2022-11-02 20:44:53 +11:00
wish
ada593990e update CheckMonthlyItem 2022-11-02 19:13:23 +11:00
wish
5bf8c9d9a9 update course calculations 2022-11-02 13:30:16 +11:00
wish
f435c97f67 Merge branch 'main' into feature/quest-enum
# Conflicts:
#	server/channelserver/handlers_quest.go
2022-11-01 12:24:23 +11:00
wish
8326e22d9f empty ClientContext struct 2022-11-01 10:54:30 +11:00
wish
4390617ccf update rights integer via struct 2022-10-30 23:18:53 +11:00
wish
31bac7bd68 initial course command 2022-10-30 15:03:12 +11:00
wish
bac4e70be4 course enumeration concept 2022-10-30 11:44:22 +11:00
wish
1ff7561d5c merge linting 2022-10-23 18:34:58 +11:00
rockisch
b69305a8a9 read static byte in 'Parse' call 2022-10-23 01:20:22 -03:00
wish
07c00cc2e3 stub guild hunt box 2022-10-13 04:21:07 +11:00
wish
4f2a94cc50 partially decode TerminalLog 2022-10-06 02:23:01 +11:00
wish
4fe56cd6e3 implement guild poogie outfits 2022-10-05 13:08:53 +11:00