pvary commented on code in PR #3226:
URL: https://github.com/apache/hive/pull/3226#discussion_r864840532
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java:
##########
@@ -1411,15 +1411,32 @@ public void testCommandsWithPartitionClauseThrow() {
@Test
public void testAuthzURI() throws TException, InterruptedException,
URISyntaxException {
TableIdentifier target = TableIdentifier.of("default", "target");
- testTables.createTable(shell, target.name(),
HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
+ Table table = testTables.createTable(shell, target.name(),
HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
PartitionSpec.unpartitioned(), FileFormat.PARQUET, ImmutableList.of());
org.apache.hadoop.hive.metastore.api.Table hmsTable =
shell.metastore().getTable(target);
HiveIcebergStorageHandler storageHandler = new HiveIcebergStorageHandler();
storageHandler.setConf(shell.getHiveConf());
URI uriForAuth = storageHandler.getURIForAuth(hmsTable);
- Assert.assertEquals("iceberg://" + hmsTable.getDbName() + "/" +
hmsTable.getTableName(), uriForAuth.toString());
+ Assert.assertEquals("iceberg:/" + URI.create(((BaseTable)
table).operations().current()
+ .metadataFileLocation()).getPath(), uriForAuth.toString());
+
+ }
+
+ @Test
+ public void testAutzURIWithAuthEnabled() throws TException,
InterruptedException, URISyntaxException {
Review Comment:
Can we check which URL is checked for security on table creation? Maybe with
a Mock security handler?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]