Skip to content

test: materialized view privileges#2209

Merged
davecramer merged 10 commits intopgjdbc:masterfrom
mgrobaker:tests_for_getTablePrivileges
Nov 12, 2021
Merged

test: materialized view privileges#2209
davecramer merged 10 commits intopgjdbc:masterfrom
mgrobaker:tests_for_getTablePrivileges

Conversation

@mgrobaker
Copy link
Copy Markdown
Contributor

  • Add materialized view to set up and tear down
  • Add test for materialized view privileges
  • Make helper function to reduce repeated code around testing privileges

Fixes #2060

mgrobaker added 6 commits July 5, 2021 20:23
Add to TestUtil and also to DatabaseMetaData setup and teardown

fixes pgjdbc#2060
make "matviewtest" all lowercase so it can be found in pg catalog, which lowercases all names

fixes pgjdbc#2060
Remove reused code
Add comments
Statement st = con.createStatement();
try {
// Drop the view
dropView(con, matViewName);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be dropMaterializedView(...).

Comment thread pgjdbc/src/test/java/org/postgresql/test/TestUtil.java Outdated
}
TestUtil.createTable(con, "metadatatest",
"id int4, name text, updated timestamptz, colour text, quest text");
TestUtil.createTable(con, "precision_test", "implicit_precision numeric");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you might be basing this on an out of date branch. Rebase atop master as these changes should not be removing those tests.

Comment thread pgjdbc/src/test/java/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java Outdated
@sehrope
Copy link
Copy Markdown
Member

sehrope commented Jul 6, 2021

I did a quick review of this PR. Some changes requested. I also enabled the CI to build. You should be able to run all of this locally too.

@davecramer
Copy link
Copy Markdown
Member

@mgrobaker I would love to merge this but we need some changes made. Are you able to take care of this ?

@davecramer davecramer merged commit 7d2a21e into pgjdbc:master Nov 12, 2021
@mgrobaker
Copy link
Copy Markdown
Contributor Author

@davecramer thank you for finishing this for me - sorry I hadn't responded to the original review

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.

Add additional tests for getTablePrivileges() for materialized views and foreign tables

3 participants