Skip to content

test: Add edge case tests for Hugo/Presidium generation #47

@richardwooding

Description

@richardwooding

Summary

Add comprehensive edge case testing for Hugo site generation with Presidium layouts.

Context

Code review of PR #45 identified gaps in test coverage for edge cases and error scenarios.

Test Coverage Needed

1. Special Characters in enterprise_key

  • Test server names with spaces (e.g., "My MCP Server")
  • Test server names with special characters (e.g., "server@2.0", "test-server_v1")
  • Test server names with unicode characters
  • Verify Hugo YAML remains valid with these characters

2. Presidium Frontmatter Validation

  • Test with missing required frontmatter fields (author, title)
  • Test with invalid author format (non-email)
  • Test with strict validation enabled/disabled
  • Verify error messages are helpful

3. Module Download Failures

  • Test behavior when Presidium modules are unavailable
  • Test offline mode scenarios
  • Test with invalid module paths
  • Verify error handling provides actionable guidance

4. Menu Generation Edge Cases

  • Test menu identifier generation with special characters
  • Test with very long section names
  • Test with duplicate section names
  • Verify menu structure remains valid

Implementation Notes

  • Use table-driven tests for multiple scenarios
  • Mock network failures for module download tests
  • Validate generated YAML syntax
  • Ensure error messages guide users to solutions

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions