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
Background
lib.rscurrently comments out two test modules rather than fixing them:Both
event_tests.rsandvalidation_tests.rsstill exist on disk with real test cases in them, but since themoddeclarations are commented out,cargo testnever 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
mod event_tests;andmod validation_tests;inlib.rsand runcargo testto surface the actual compile errors.event_tests.rs(likely stale imports/signatures vs. currentevents.rsAPI).validation_tests.rs(likely stale imports/signatures vs. currentvalidation.rsAPI).cargo test -p teachlink-contract.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_testsandvalidation_testsare activemoddeclarations inlib.rscargo testcompiles and runs both modules with no ignored/skipped tests introduced as a workaround