Skip to content

Commit b0738cb

Browse files
piotrrzyskofindepi
authored andcommitted
Fix testAnalyzeMaterializedViewWithAccessControl
Previously, analysis was performed using AllowAllAccessControl, so the test setup was ignored.
1 parent 173587c commit b0738cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/trino-main/src/test/java/io/trino/sql/analyzer/TestAnalyzer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5818,11 +5818,11 @@ public void testAnalyzeMaterializedViewWithAccessControl()
58185818
TestingAccessControlManager accessControlManager = new TestingAccessControlManager(transactionManager, emptyEventListenerManager(), new SecretsResolver(ImmutableMap.of()));
58195819
accessControlManager.setSystemAccessControls(List.of(AllowAllSystemAccessControl.INSTANCE));
58205820

5821-
analyze("SELECT * FROM fresh_materialized_view");
5821+
analyze(CLIENT_SESSION, "SELECT * FROM fresh_materialized_view", accessControlManager);
58225822

58235823
// materialized view analysis should succeed even if access to storage table is denied when querying the table directly
58245824
accessControlManager.deny(privilege("t2.a", SELECT_COLUMN));
5825-
analyze("SELECT * FROM fresh_materialized_view");
5825+
analyze(CLIENT_SESSION, "SELECT * FROM fresh_materialized_view", accessControlManager);
58265826

58275827
accessControlManager.deny(privilege("fresh_materialized_view.a", SELECT_COLUMN));
58285828
assertFails(

0 commit comments

Comments
 (0)