Skip to content

test(auth): add Chain orchestration coverage for login command order and short-circuiting#58791

Draft
joshtrichards wants to merge 1 commit intomasterfrom
jtr/tests-auth-login-chain
Draft

test(auth): add Chain orchestration coverage for login command order and short-circuiting#58791
joshtrichards wants to merge 1 commit intomasterfrom
jtr/tests-auth-login-chain

Conversation

@joshtrichards
Copy link
Member

  • Resolves: #

Summary

While existing tests validate individual command logic, they don’t protect against regressions in chain composition (missing/reordered links). This test suite closes that gap and safeguards login flow integrity, especially around sequencing-sensitive steps like Flow V2 session handling, token creation, and 2FA handoff.

This PR adds focused unit coverage for OC\Authentication\Login\Chain to validate orchestration behavior that command-level tests do not cover:

  • exact setNext() wiring order across all login commands
  • end-to-end traversal through the configured chain
  • correct propagation of the head command’s return result
  • short-circuit behavior when the head returns failure

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…ircuiting

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress feature: authentication tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant