Skip to content

Configure [[test]] entries so unit/integration tests are compiled by Cargo #176

Description

@DeFiVC

What

Test files in tests/unit/ and tests/integration/ subdirectories are never compiled because Cargo only auto-discovers integration tests at the top level of tests/. None of the bugs in those files are caught by cargo test.

Why

All bugs found in progress_tests.rs, credential_flow.rs, and token_tests.rs are invisible to the CI pipeline — these files exist but are silently skipped during compilation. This means the test suite gives a false sense of coverage.

Scope

  • Add [[test]] entries to the workspace Cargo.toml for each test file in subdirectories
  • Alternatively, restructure to use a tests/main.rs module root
  • Verify all tests are now compiled and discovered by cargo test

Technical Context

  • File: Cargo.toml (workspace root)
  • Test files: tests/unit/token_tests.rs, tests/unit/progress_tests.rs, tests/unit/credential_tests.rs, tests/integration/credential_flow.rs
  • Cargo's default behavior only auto-discovers tests/*.rs (flat), not tests/**/*.rs

Acceptance Criteria

  • cargo test compiles and runs all test files in subdirectories
  • Each test file is discoverable (run cargo test -- --list to verify)
  • No duplicate test names across entries

Metadata

Metadata

Assignees

No one assigned

    Labels

    highSignificant functionality broken, no workaround, affects multiple users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions