aboutsummaryrefslogtreecommitdiff
path: root/hotline/server_test.go
AgeCommit message (Collapse)Author
2025-07-05Fix string splitting bug and add comprehensive tracker registration testsJeff Halter
- Fix critical bug in tracker address parsing: strings.Split(t, ":") instead of strings.Split(":", t) - Add dependency injection for TrackerRegistrar to improve testability - Extract registerWithAllTrackers() helper function to eliminate code duplication - Add comprehensive test suite covering: * Unit tests for parseTrackerPassword with edge cases and special characters * Integration tests for registerWithTrackers with mocking * Context cancellation and graceful shutdown testing * Error handling for network failures and malformed addresses * Edge cases like zero ports, long names, and empty configurations - Improve password parsing to handle colons in passwords correctly - Add MockTrackerRegistrar for isolated testing without network dependencies The string splitting bug would have prevented tracker registration from working with password-protected trackers. All tests pass and verify the fix works correctly.
2024-07-19Add option for account-specific file rootJeff Halter
2024-07-17Extensive refactor, quality of life enhancementsJeff Halter
* Added ability to reload config, agreement, news, and user accounts without restarting the server by sending SIGHUP to the running process * Added ability to use modern unix or windows line breaks in Agreement.txt and MessageBoard.txt instead of classic MacOS `\r` breaks. * Extensive refactor towards swappable backends for the active server state * Extensive refactored towards making the hotline package generic and re-usable for alternate server implemenations * Fix bug where users whose accounts have been deleted would not be disconnected
2024-07-09Extensive refactor and clean upJeff Halter
2024-06-24Refactoring, cleanup, test backfillingJeff Halter
2024-06-18Adopt more fixed size array types for struct fieldsJeff Halter
2024-06-10Replace zap logger with slogJeff Halter
2023-04-22More minor cleanupJeff Halter
2022-09-15Clean up some linter warningsJeff Halter
2022-06-23Implement GetClientInfoText with per-client file transfer infoJeff Halter
2022-06-20Add initial support for resource and info forksJeff Halter
2022-05-28Misc cleanupJeff Halter
* Removed some unnecessary user of pointers * Removed dead cruft * Reorganized code
2021-08-03Ran `gofmt -w .`Jeff Halter
2021-07-28Move code to hotline dirJeff Halter