Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KeyVaultChallengeBasedAuthenticationPolicy test MultipleTimes since the bearer token policy now invalidates the token cache on receiving a 401. #6191

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

ahsonkhan
Copy link
Contributor

@ahsonkhan ahsonkhan commented Nov 7, 2024

With #6151 and subsequent overflow fix #6190, this specific test behavior needs to be updated to match expectations.

We no longer return an older cached token, since those are rightly invalidated whenever a challenge response is received.

Fixes the test failure from https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4308371&view=logs&j=d321cacd-258d-5801-407f-101c556a68a1&t=3eed5caa-5462-5e1e-56c8-8288eee731c0&l=36941

2024-11-07T03:09:27.9515644Z 158: /mnt/vss/_work/1/s/sdk/keyvault/azure-security-keyvault-secrets/test/ut/challenge_based_authentication_policy_test.cpp:98: Failure
2024-11-07T03:09:27.9516645Z 158: Expected: (m_currentResponse) < (m_responses.size()), actual: 4 vs 4
2024-11-07T03:09:27.9517355Z 158: unknown file: Failure
2024-11-07T03:09:27.9518481Z 158: C++ exception with description "GetToken(): vector::_M_range_check: __n (which is 4) >= this->size() (which is 4)" thrown in the test body.
2024-11-07T03:09:27.9522027Z 158: [  FAILED  ] KeyVaultChallengeBasedAuthenticationPolicy.MultipleTimes (5 ms)

…ce the bearer token policy now invalidates the token cache on receiving a 401.
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@ahsonkhan
Copy link
Contributor Author

/azp run cpp - keyvault

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ahsonkhan
Copy link
Contributor Author

/azp run cpp - storage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

antkmsft
antkmsft approved these changes Nov 7, 2024
@ahsonkhan ahsonkhan merged commit 127fab4 into Azure:main Nov 7, 2024
160 checks passed
@ahsonkhan ahsonkhan deleted the FixKeyVaultPolicyTest branch November 7, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants