fix(tests): gate TEST_PASSWORD behind standalone to green main CI #40

Merged
nrupard merged 1 commit from fix/saas-clippy-test-password-RUS-3 into main 2026-06-12 18:00:13 +02:00
Owner

What

main is currently red: run #81 (check.yml on push to main) fails the saas clippy step.

error: constant `TEST_PASSWORD` is never used
  --> src/testing.rs:16:11
  = note: `-D dead-code` implied by `-D warnings`
error: could not compile `rus` (bin "rus-saas" test) due to 1 previous error

TEST_PASSWORD is consumed only by the standalone auth tests in src/handlers/auth.rs; the saas build has no password-based tests, so under --no-default-features --features saas it is dead code. Gate it with #[cfg(feature = "standalone")], matching the existing TEST_JWT_SECRET const right above it.

Context

Third and final latent issue surfaced by the CI that #36 introduced: fmt (fixed #37), the shorten closure unused var (fixed #38), and now this saas-only dead-code const. #38 was merged before this fix could be appended, and #36 merged alongside, so main landed with check.yml present but this lint unresolved.

Verification

Ran both passes locally in the dev container, each exit 0:

  • cargo clippy --all-targets --features standalone -- -D warnings
  • cargo clippy --all-targets --no-default-features --features saas -- -D warnings

This PR's own CI (check.yml now lives in main) is the authoritative confirmation.

#RUS-3

## What `main` is currently red: run #81 (`check.yml` on push to `main`) fails the saas clippy step. ``` error: constant `TEST_PASSWORD` is never used --> src/testing.rs:16:11 = note: `-D dead-code` implied by `-D warnings` error: could not compile `rus` (bin "rus-saas" test) due to 1 previous error ``` `TEST_PASSWORD` is consumed only by the standalone auth tests in `src/handlers/auth.rs`; the saas build has no password-based tests, so under `--no-default-features --features saas` it is dead code. Gate it with `#[cfg(feature = "standalone")]`, matching the existing `TEST_JWT_SECRET` const right above it. ## Context Third and final latent issue surfaced by the CI that #36 introduced: fmt (fixed #37), the `shorten` closure unused var (fixed #38), and now this saas-only dead-code const. #38 was merged before this fix could be appended, and #36 merged alongside, so `main` landed with `check.yml` present but this lint unresolved. ## Verification Ran both passes locally in the dev container, each exit 0: - `cargo clippy --all-targets --features standalone -- -D warnings` - `cargo clippy --all-targets --no-default-features --features saas -- -D warnings` This PR's own CI (check.yml now lives in `main`) is the authoritative confirmation. #RUS-3
fix(tests): gate TEST_PASSWORD behind standalone feature
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 50s
Create release / Create release from merged PR (pull_request) Has been skipped
bb2fdc0b21
The saas clippy pass (`cargo clippy --no-default-features --features saas -- -D warnings`) from #36's check.yml fails on `dead_code`: `TEST_PASSWORD` in src/testing.rs is consumed only by the standalone auth tests in src/handlers/auth.rs (the saas build has no password-based tests), so it is unused under `--features saas`. Gate it with `#[cfg(feature = "standalone")]`, matching the existing `TEST_JWT_SECRET` const. Verified both `--features standalone` and `--no-default-features --features saas` clippy passes are clean with `-D warnings`.

#RUS-3
nrupard deleted branch fix/saas-clippy-test-password-RUS-3 2026-06-12 18:00:13 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
a8n-tools/rus!40
No description provided.