Skip to content

Add boundary tests for the authorization logic #308

Description

@mikewheeleer

Cover authorization boundaries

Description

The authorization logic is thinly tested at its boundaries. This issue adds focused boundary and rejection tests.

Requirements and context

  • Repository scope: StableRoute-Org/Stableroute-contracts only.
  • Add tests for the accept/reject boundaries of authorization, asserting exact typed error codes.
  • Use the test-utils helpers; assert events where the flow emits them.
  • Do not change contract logic unless a defect is found (note it).

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b test/authorization-01-boundaries
  • Implement changes
    • Write code in: the relevant module.
    • Write comprehensive tests in: cover the new behaviour and edge cases.
  • Test and commit

Test and commit

  • Run cargo fmt, cargo clippy --all-targets -- -D warnings, and cargo test.
  • Cover edge cases: exactly-at boundary, one over, unauthorized caller.
  • Include the full test output in the PR description.

Example commit message

test(authorization): cover boundaries and rejections

Guidelines

  • Minimum 95 percent test coverage for impacted modules.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the StableRoute community on Discord: https://discord.gg/37aCpusvx
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — a 5-star rating is much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions