Skip to content

Patch the libpq version in two OAuth server tests so they pass on libpq older than 18. - #10934

Merged
dpage merged 1 commit into
pgadmin-org:masterfrom
dpage:fix/oauth-tests-old-libpq
Dec 3, 2026
Merged

dpage merged 1 commit into
pgadmin-org:masterfrom
dpage:fix/oauth-tests-old-libpq

Conversation

@dpage

@dpage dpage commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Since #10830 was merged, Run Python tests on PostgreSQL fails on macOS and Windows against PostgreSQL 15 to 17, where CI loads a libpq older than 18. In 9 scenarios, test_server_kerberos_exclusivity and test_update_checked_endpoint save or update an oauth_direct server, which pgAdmin now refuses on such a libpq:

The oauth_direct authentication method is not available in this pgAdmin: it needs libpq 18 or later, and pgAdmin is using libpq 16.16.

Both tests now patch pg_oauth2.loaded_libpq_version to 18, as test_server_auth_method already does. With the loaded version faked to 16.16 locally, the 9 failures reproduce without this change and pass with it.

Summary by CodeRabbit

  • Tests
    • Updated automated test setup for server authentication and checked-status scenarios to use a consistent libpq version. No changes to application behavior or user-facing features.

…pq older than 18.

test_server_kerberos_exclusivity and test_update_checked_endpoint save or
update servers that use oauth_direct, which pgAdmin refuses when its libpq
is older than 18. They passed where CI loads libpq 18 or later, but failed
on macOS and Windows against PostgreSQL 15 to 17. Patch the loaded libpq
version to 18, as the other auth method tests already do, so they run the
same on any libpq.
@dpage dpage self-assigned this Dec 3, 2026
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Two server test modules now patch the loaded libpq version to 180000 during setup. Each registers cleanup to stop the patch. The test scenarios and server API assertions are otherwise unchanged.

Changes

Libpq test setup

Layer / File(s) Summary
Patch libpq version in test setup
web/pgadmin/browser/server_groups/servers/tests/test_server_kerberos_exclusivity.py, web/pgadmin/browser/server_groups/servers/tests/test_update_checked_endpoint.py
Both test modules define the patch target and version value. Their setup methods patch the loaded libpq version to 180000 and register cleanup to stop the patch.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

Suggested reviewers: draoncc

Merge Risk: Minimal · up to a5d18

This change only adjusts test setup so that server tests pass on hosts with an older libpq. It does not touch production behavior, and I found no concrete merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the actual change: patching the libpq version in two OAuth server tests. The raw summary says both test files patch the loaded libpq version to 18 for each scenario, and the objectives…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the actual change: patching the libpq version in two OAuth server tests. The raw summary says both test files patch the loaded libpq version to 18 for each scenario, and the objectives say the patch covers test_server_kerberos_exclusivity and test_update_checked_endpoint so they pass when libpq is older than 18. The title is specific and matches the main change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 085e137 and a5d189b.

Files selected for processing: 2

  • web/pgadmin/browser/server_groups/servers/tests/test_server_kerberos_exclusivity.py
  • web/pgadmin/browser/server_groups/servers/tests/test_update_checked_endpoint.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@dpage
dpage merged commit b4b1830 into pgadmin-org:master Dec 3, 2026
32 checks passed
@dpage
dpage deleted the fix/oauth-tests-old-libpq branch December 3, 2026 15:23
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.

1 participant