Skip to content

Create comprehensive configuration loading test suite #18

@bdamokos

Description

@bdamokos

Create comprehensive configuration loading test suite

Issue Description

We need a comprehensive test suite that examines all possible combinations of provider configurations across different configuration sources. This will help prevent issues like #17 (BKK config loading order) and ensure consistent behavior across all providers.

Test Cases to Cover

The test suite should verify configuration loading for:

  1. All implemented providers (STIB, De Lijn, BKK)
  2. All configuration sources:
    • Provider defaults (app/transit_providers/*/config.py)
    • Default configuration (default.py)
    • Local configuration (local.py)
  3. All combinations of:
    • Full configuration in each source
    • Partial configuration in each source
    • Missing configuration in each source
    • Overlapping configurations

Implementation Details

  1. Create a test framework that can:
    • Modify configuration files programmatically
    • Start/stop the server
    • Make API requests
    • Verify the returned configuration
  2. Test scenarios should include:
    • Basic configuration loading
    • Configuration merging
    • Configuration overriding
    • Default fallbacks
    • Invalid configurations

Success Criteria

  • All providers follow the same configuration precedence rules
  • Configuration changes in any source are correctly reflected in the API
  • Invalid configurations are handled gracefully
  • Tests are automated and can be run as part of CI/CD

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttestsIssues related to testing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions