Skip to content

Fix test for server 9.0#3067

Merged
jamis merged 1 commit into
mongodb:masterfrom
jamis:fix-9.0-alpha-error
Jun 24, 2026
Merged

Fix test for server 9.0#3067
jamis merged 1 commit into
mongodb:masterfrom
jamis:fix-9.0-alpha-error

Conversation

@jamis

@jamis jamis commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

An auth test was failing with latest server because an unknown user was expected to negotiate scram-sha-1, but with latest it was using scram-sha-256.

@jamis jamis requested a review from a team as a code owner June 24, 2026 19:45
@jamis jamis requested review from comandeo-mongo and Copilot June 24, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the integration auth spec to accommodate MongoDB server 9.0+ behavior where an unknown user may negotiate SCRAM-SHA-256 instead of always using SCRAM-SHA-1, preventing failures against latest.

Changes:

  • Adjusted the unauthorized-error expectation to accept either SCRAM mechanism for a non-existent user when the mechanism is not explicitly provided.
  • Updated the spec description/commentary to reflect server-version-dependent negotiation behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 50 to +52
connection.connect!
end.to raise_error(Mongo::Auth::Unauthorized,
/User nonexistent_user \(mechanism: scram\) is not authorized to access admin.*used mechanism: SCRAM-SHA-1/)
/User nonexistent_user \(mechanism: scram(256)?\) is not authorized to access admin.*used mechanism: SCRAM-SHA-(1|256)/)
@jamis jamis merged commit 0f81874 into mongodb:master Jun 24, 2026
217 of 219 checks passed
@jamis jamis deleted the fix-9.0-alpha-error branch June 24, 2026 20:44
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.

3 participants