Skip to content

[MINOR] Test coverage depends on database state — tests are not hermetic #85

Description

@ULookup

Severity: MINOR

Files: libs/worldbuilding/tests/test_condition_evaluator.cpp, libs/worldbuilding/tests/test_pipeline_manager.cpp

Problem

The C++ tests require a live PostgreSQL connection and depend on specific data being present (worlds, entities, scenes, etc.). Without the database running and seeded with test data, all tests will fail. This makes tests non-hermetic and not runnable in CI without database setup.

Expected Fix

  1. Add a test database setup/teardown fixture that creates and seeds required tables
  2. OR refactor ConditionEvaluator to accept a mockable data source interface
  3. OR add SQLite fallback for test environments
  4. Document required test database schema in a README or setup script

Design Reference

See docs/superpowers/specs/2026-06-09-pipeline-manager-fix-design.md section on test hermeticity.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions