This is an automated email from the ASF dual-hosted git repository. hubcio pushed a commit to branch feat/durable-protocol-and-sessions in repository https://gitbox.apache.org/repos/asf/iggy.git
commit f7fe210bfddad12c176b09022f596a171cdf149a Author: Hubert Gruszecki <[email protected]> AuthorDate: Mon Oct 5 16:24:24 2026 +0200 test(integration): accept reauthentication denial after user deletion Session eviction triggers automatic SDK login, which returns InvalidCredentials for a deleted account. Accept that denial. --- .../tests/server/scenarios/permissions_scenario.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/integration/tests/server/scenarios/permissions_scenario.rs b/core/integration/tests/server/scenarios/permissions_scenario.rs index c4e535254..fa5075f2c 100644 --- a/core/integration/tests/server/scenarios/permissions_scenario.rs +++ b/core/integration/tests/server/scenarios/permissions_scenario.rs @@ -2624,9 +2624,9 @@ async fn test_live_permission_revocation(harness: &TestHarness, root_client: &Ig // ============================================================================= // Test: Deleting a user with a live session denies that session's next read. // A read_servers grant makes the pre-delete read a real Ok (get_stats is not -// enumeration-safe), so the post-delete denial is unambiguous. The binary -// transports may answer Unauthenticated (session eviction) rather than -// Unauthorized, so accept either. +// enumeration-safe), so the post-delete denial is unambiguous. Session eviction +// may trigger SDK reauthentication, which returns InvalidCredentials for the +// deleted user. // ============================================================================= async fn test_deleted_user_session_denied(harness: &TestHarness, root_client: &IggyClient) { @@ -2658,8 +2658,9 @@ async fn test_deleted_user_session_denied(harness: &TestHarness, root_client: &I assert!( matches!(&result, Err(e) if e.as_code() == IggyError::Unauthorized.as_code() - || e.as_code() == IggyError::Unauthenticated.as_code()), - "deleted user's live session must be denied (Unauthorized or Unauthenticated), got {result:?}" + || e.as_code() == IggyError::Unauthenticated.as_code() + || e.as_code() == IggyError::InvalidCredentials.as_code()), + "deleted user's live session or automatic reauthentication must be denied, got {result:?}" ); }
