You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: Fix privacy template test expectations and add coverage for auto-cleanup
## Test Improvements
### Template Coverage Updates
- **Added privacy-auto-cleanup.sh.j2** to active test templates (was commented out)
- **Updated test variables** to include missing `clean_package_cache` parameter
- **Added validation logic** for auto-cleanup template rendering
### Pattern Matching Fixes
- **Fixed regex expectations** to match actual strengthened patterns:
- Changed `CHILD_SA.*established` to `CHILD_SA [^[]+ established`
- Updated both positive and negative test cases consistently
- **Enhanced template validation** with specific assertions for auto-cleanup script
### Test Variables Enhancement
- **Complete privacy_auto_cleanup config**: Added `clean_package_cache: True`
- **Comprehensive test coverage**: All privacy templates now properly tested
- **Robust validation**: Template-specific content assertions for each template type
## Verification Results
- ✅ **4/4 privacy tests passing**
- ✅ **Template rendering validation** for all existing templates
- ✅ **Proper error handling** for missing templates (99-privacy-enhanced.j2)
- ✅ **Regex pattern security** validation working correctly
This addresses the feedback about template file gaps - the auto-cleanup template exists and is now properly tested, with only the intentionally unimplemented 99-privacy-enhanced.j2 remaining commented out.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments