Repository navigation
Skip the view msql tests that expect DROP VIEW on EPAS. - #10660
kundansable wants to merge 1 commit into
Conversation
EPAS can change a view's columns with CREATE OR REPLACE VIEW, so pgAdmin only drops and re-creates the view on PostgreSQL (pgadmin-org#5053). The tests added for pgadmin-org#9838 expected DROP VIEW on every server and failed on EPAS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe view-MSQL test setup now skips scenarios whose configured server type differs from the current server. Two scenarios specify PostgreSQL and an EPAS-specific skip message; their definitions and expected ChangesView MSQL test constraints
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
Summary
The "Run Python tests on EPAS" workflow fails on EPAS 15 (Windows) and EPAS 18 (Linux) with two failures in
test_views_get_msql.py(run):Get view msql: Changing the columns drops the view.Get view msql: Removing a column after valid_from drops the view.Both were added for #9838 and assert
DROP VIEWin the generated SQL. EPAS getsCREATE OR REPLACE VIEWinstead, becauseViewNode._get_definition_dataonly flags a drop whenserver_type == 'pg'. That guard is deliberate (#5053): EPAS can change a view's columns withCREATE OR REPLACE VIEW, and the client-side warning inview.ui.jsuses the same check.I confirmed the server behaviour with temp views inside a rolled-back transaction:
CREATE OR REPLACE VIEWthat…cannot drop columns from viewSo the product code is correct and only the tests are wrong. This change skips the two scenarios when the server is not PostgreSQL, using a
server_typekey in the test data thatsetUpchecks before it creates anything.Testing
server_typetemporarily set toppas, both scenarios report the skip message on PG.🤖 Generated with Claude Code
Summary by CodeRabbit