Skip to content

MPT-19657 fix unauthorized response in E2E tests#253

Merged
d3rky merged 1 commit intomainfrom
bugfix/MPT-19657/fix-e2e-unauthorized-tests
Mar 27, 2026
Merged

MPT-19657 fix unauthorized response in E2E tests#253
d3rky merged 1 commit intomainfrom
bugfix/MPT-19657/fix-e2e-unauthorized-tests

Conversation

@d3rky
Copy link
Copy Markdown
Contributor

@d3rky d3rky commented Mar 27, 2026

Closes MPT-19657

  • Updated E2E authorization test to expect "401 Authentication Failed" error message instead of "401 Unauthorized" when validating responses with invalid API tokens

@d3rky d3rky requested a review from a team as a code owner March 27, 2026 11:02
@d3rky d3rky requested review from albertsola and svazquezco March 27, 2026 11:02
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 49412181-3ef4-40fb-a22a-c86e2608252c

📥 Commits

Reviewing files that changed from the base of the PR and between fab87cd and 2973ac3.

📒 Files selected for processing (1)
  • tests/e2e/test_access.py

📝 Walkthrough

Walkthrough

Updated an e2e authorization test to expect a different HTTP error message when an invalid API token is used. The expected error message changed from "401 Unauthorized" to "401 Authentication Failed" while maintaining the same exception type and request call.

Changes

Cohort / File(s) Summary
E2E Authorization Tests
tests/e2e/test_access.py
Updated assertion regex to expect "401 Authentication Failed" instead of "401 Unauthorized" in the pytest.raises validation for invalid API token requests.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed The PR title contains exactly one Jira issue key (MPT-19657) in the correct format at the beginning.
Test Coverage Required ✅ Passed The PR modifies only a test file (tests/e2e/test_access.py) and no non-test code files, satisfying the condition 'no code files are modified'.
Single Commit Required ✅ Passed The pull request contains exactly one commit (2973ac3 MPT-19657 fix unauthorized response in E2E tests), satisfying the requirement for a single commit with clean git history.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

@d3rky d3rky merged commit 9ef1497 into main Mar 27, 2026
4 checks passed
@d3rky d3rky deleted the bugfix/MPT-19657/fix-e2e-unauthorized-tests branch March 27, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants