[$25 BOUNTY] Add diagnostic bundle validation tests#3
Conversation
Add comprehensive test suite for diagnostic bundle validation: - test_diagnostic_files_exist: Verify logd and json files are created - test_diagnostic_json_structure: Validate required JSON fields - test_diagnostic_counts_match: Ensure module counts are consistent - test_module_status_values: Verify PASS/FAIL status values - test_module_required_fields: Check all required module fields - test_elapsed_seconds_numeric: Validate numeric elapsed times - test_path_redaction: Ensure sensitive paths are redacted - test_missing_json_fails: Detect missing JSON metadata - test_missing_logd_fails: Detect missing logd bundle - test_mismatched_commit_ids: Catch commit ID mismatches - test_cross_platform_path_separator: Verify forward slashes - test_deterministic_output: Ensure consistent validation results - test_build_module_imports: Verify build module imports - test_module_list_not_empty: Confirm modules are defined Also fix f-string backslash syntax error in build.py. Closes Andyyook#1
|
Thanks for the PR. I cannot forward this as bounty-ready in its current form. The PR deletes |
|
Thanks for the review! I have addressed the feedback: ✅ Restored All changes are scoped to diagnostic bundle validation tests only. Please take another look when you have a chance. |
Summary
This PR adds comprehensive diagnostic bundle validation tests as requested in #1.
Changes
tests/test_diagnostic_bundle.py: New test suite with 14 tests covering:
build.py: Fixed f-string backslash syntax error for Python 3.12+ compatibility
Testing
All 14 tests pass locally:
$ python3 tests/test_diagnostic_bundle.py test_build_module_imports ... ok test_module_list_not_empty ... ok test_cross_platform_path_separator ... ok test_deterministic_output ... ok test_diagnostic_counts_match ... ok test_diagnostic_files_exist ... ok test_diagnostic_json_structure ... ok test_elapsed_seconds_numeric ... ok test_mismatched_commit_ids ... ok test_missing_json_fails ... ok test_missing_logd_fails ... ok test_module_required_fields ... ok test_module_status_values ... ok test_path_redaction ... ok ---------------------------------------------------------------------- Ran 14 tests in 0.014s OKChecklist
Closes #1