Skip to content

Conversation

@tianzhou
Copy link
Contributor

@tianzhou tianzhou commented Jan 5, 2026

Follow up #226. Move the test case into add_policy instead of creating a standalone test.

Standalone test requires separate run which adds test time. We only create separate test case if they don't fit with any existing test cases or it's testing an edge case.

Copilot AI review requested due to automatic review settings January 5, 2026 03:40
@tianzhou
Copy link
Contributor Author

tianzhou commented Jan 5, 2026

@asonawalla

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates test coverage by moving the same_schema_table_reference test case into the existing add_policy test suite. The standalone test for Issue #224 (testing table reference normalization in policy expressions) is being merged into the broader add_policy test to reduce test execution time.

Key Changes:

  • Removed standalone same_schema_table_reference test directory and all its fixtures
  • Added orders table and orders_user_access policy to the add_policy test case
  • Updated test fixtures (plan.sql, diff.sql, old.sql, new.sql) to include the new table and policy

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testdata/diff/create_policy/same_schema_table_reference/plan.txt Removed standalone test plan output
testdata/diff/create_policy/same_schema_table_reference/plan.sql Removed standalone test expected SQL
testdata/diff/create_policy/same_schema_table_reference/plan.json Removed standalone test JSON plan
testdata/diff/create_policy/same_schema_table_reference/old.sql Removed standalone test initial schema
testdata/diff/create_policy/same_schema_table_reference/new.sql Removed standalone test target schema
testdata/diff/create_policy/same_schema_table_reference/diff.sql Removed standalone test diff output
testdata/diff/create_policy/add_policy/plan.sql Added orders RLS and policy to expected plan output
testdata/diff/create_policy/add_policy/old.sql Added orders table to initial schema
testdata/diff/create_policy/add_policy/new.sql Added orders table, RLS enablement, and orders_user_access policy
testdata/diff/create_policy/add_policy/diff.sql Added orders RLS and policy to expected diff output

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.


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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.


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

@tianzhou tianzhou merged commit 70dfd76 into main Jan 5, 2026
8 checks passed
@tianzhou tianzhou deleted the adjust_test_case branch January 5, 2026 14:12
alecthomas pushed a commit to alecthomas/pgschema that referenced this pull request Jan 26, 2026
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