Skip to content

Rust SDK: test coverage for admin.compliance.generate_report(period) / list_reports(period, limit, offset) #765

Description

@Mac-5

Description
Add focused unit tests for admin.compliance.generate_report and admin.compliance.list_reports (implemented in Issue #122) using a mocked HTTP transport — no live server, no database.

Scope guardrail: this PR must only touch files under sdks/rust/. Do not touch anything under src/ — read the handler referenced below only to learn the request/response contract.

Requirements and context

  • Cover the happy path for both methods.
  • Test the documented edge case: an invalid period in generate_report must surface as a typed error distinct from a network/transport error.
  • Test that the admin key (not the public key) is sent on both requests.
  • Depends on Issue Transaction Export Integration Tests #122.

Suggested execution

  1. Fork the repo and create a branch
    git checkout -b feature/rust-sdk-test-coverage-for-admincompliancereports
  2. Implement changes
    • Set up a mocked HTTP transport returning canned responses.
    • Write happy-path tests for generate and list.
    • Write the invalid-period error-path test for generate_report.
    • Confirm cargo test is green with no network access required.
  3. Test and commit
    • Run the crate's test command and confirm it's green
    • Example commit message: test(sdk): add coverage for admin compliance methods

Guidelines

  • Assignment required before starting
  • PR description must include: Closes #123
  • PR must only touch files under sdks/rust/
  • Complexity: High (200 points) — Every issue in this Wave is tagged High — full points regardless of individual scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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