Skip to content

Add insta snapshot tests for installation-token error messages, log_timing output, and Debug redaction #111

Description

@coderabbitai

Background

PR #99 adds InstallationAccessToken with TokenAcquisitionFailed error messages,
log_timing structured output, and a manual Debug impl that redacts the token field.
These are currently verified with brittle substring assertions.

Work required

  • Add insta to dev-dependencies in Cargo.toml if not already present.
  • Add snapshot tests in src/github/installation_token_tests.rs (or a dedicated snapshot
    test file) covering:
    • Each GitHubError::TokenAcquisitionFailed message string produced by
      InstallationAccessToken::new, from_metadata, and classify_token_error.
    • The Debug formatting of InstallationAccessToken (redaction check).
    • The structured fields emitted by log_timing (use tracing-subscriber/tracing-test
      or insta JSON snapshots of captured log events).
  • Run cargo insta review to accept baseline snapshots.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions