Skip to content

Re-enable event_tests and validation_tests modules disabled due to compile errors #489

Description

@RUKAYAT-CODER

Background

lib.rs currently comments out two test modules rather than fixing them:

// TODO: Fix event_tests module compilation errors (pre-existing issue)
// mod event_tests;
...
// TODO: Fix validation_tests compilation errors (pre-existing issue)
// mod validation_tests;

Both event_tests.rs and validation_tests.rs still exist on disk with real test cases in them, but since the mod declarations are commented out, cargo test never compiles or runs them. This means event-system and validation-module regressions can land without any of these existing tests catching them — the coverage is silently zero, not just reduced.

Implementation Plan

  • Uncomment mod event_tests; and mod validation_tests; in lib.rs and run cargo test to surface the actual compile errors.
  • Fix the compile errors in event_tests.rs (likely stale imports/signatures vs. current events.rs API).
  • Fix the compile errors in validation_tests.rs (likely stale imports/signatures vs. current validation.rs API).
  • Confirm both modules build and their tests pass under cargo test -p teachlink-contract.
  • Add a CI check (or note in CONTRIBUTING.md) that no test module may be commented out to "fix" a red build — broken tests must be fixed or deleted, not silenced.

Acceptance Criteria

  • event_tests and validation_tests are active mod declarations in lib.rs
  • cargo test compiles and runs both modules with no ignored/skipped tests introduced as a workaround
  • All tests in both modules pass

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions