Skip to content

fix: add log parser tests and fix bugs - #79

Open
abhi-0203 wants to merge 1 commit into
weilixiong:mainfrom
abhi-0203:fix/log-parser-tests
Open

fix: add log parser tests and fix bugs#79
abhi-0203 wants to merge 1 commit into
weilixiong:mainfrom
abhi-0203:fix/log-parser-tests

Conversation

@abhi-0203

Copy link
Copy Markdown

Summary

Added comprehensive test suite for log parser and fixed bugs discovered during testing.

Changes

New Files

  • tools/tests/ - Complete test suite with fixtures
  • 15 test cases covering JSON, text, nginx, and malformed logs
  • Test fixtures for all parser types

Bug Fixes

  1. Fixed extract_service() to match hyphenated service names (e.g. auth-service)
  2. Fixed NginxLogParser remote_user mapping (was using wrong regex group)
  3. Fixed Python 3.11 f-string syntax error in build.py

Test Results

All 15 tests pass (27 subtests), covering:

  • JSON log parsing
  • Text log parsing
  • Nginx log parsing
  • Malformed log handling
  • Edge cases
  • Aggregator integration

Related

Bounty: 5 for adding independent log parser

- Added 15 test cases for log parser (JSON, text, nginx, malformed)
- Fixed extract_service() to match hyphenated service names
- Fixed NginxLogParser remote_user mapping
- Fixed Python 3.11 f-string syntax error in build.py
- All tests pass (27 subtests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant