Skip to content

Improve NRI test assertions and error matching #204

Description

@AutuSnow

Follow-up from #193.

The PR review raised two testing improvements for the NRI paths:


  1. Avoid matching errors by string where possible.
  2. Prefer stricter public-behavior assertions without inspecting internal data structures directly.
    
    This issue tracks improving the NRI unit tests so they remain precise while testing through observable behavior.
    
    Scope:
  • Review NRI tests that match exact error strings.
  • Replace string matching with typed errors, sentinel errors, helper predicates, or more stable assertions where appropriate.
  • Look for places where tests were loosened to avoid checking internal state.
  • Reintroduce stronger checks through public behavior when practical.
  • Keep the tests focused; avoid turning unit tests into broad integration tests unless that is intentional.
    
    This is not required for Fail closed during NRI synchronize #193. It is follow-up test maintainability work, likely suitable for the v0.3.0 cycle.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions