Class PolarisRestCatalogIntegrationBase

java.lang.Object
org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
org.apache.polaris.service.it.test.PolarisRestCatalogIntegrationBase
Direct Known Subclasses:
PolarisRestCatalogAdlsIntegrationTestBase, PolarisRestCatalogFileIntegrationTest, PolarisRestCatalogGcsIntegrationTestBase, PolarisRestCatalogS3IntegrationTestBase

@ExtendWith(PolarisIntegrationTestExtension.class) public abstract class PolarisRestCatalogIntegrationBase extends org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
Import the full core Iceberg catalog tests by hitting the REST service via the RESTCatalog client.
  • Field Details

  • Constructor Details

    • PolarisRestCatalogIntegrationBase

      public PolarisRestCatalogIntegrationBase()
  • Method Details

    • getStorageConfigInfo

      protected abstract org.apache.polaris.core.admin.model.StorageConfigInfo getStorageConfigInfo()
      Get the storage configuration information for the catalog.
      Returns:
      StorageConfigInfo instance containing the storage configuration
    • initializeClientFileIO

      protected <T extends org.apache.iceberg.io.FileIO> T initializeClientFileIO(T fileIO)
      A hook for test subclasses to initialize FileIO objects used by test cases themselves for accessing test storage.

      Important: this FileIO instance is not tied to a REST Catalog; it is created by test code performing adhoc, direct access to the storage; thus, it may not be configured with the same properties as the ones used by catalog()!

    • clientFileIOProperties

      protected com.google.common.collect.ImmutableMap.Builder<String,String> clientFileIOProperties()
      Get the properties to be used for initializing the FileIO instance used by test code for accessing test storage.
    • externalCatalogBaseLocation

      protected URI externalCatalogBaseLocation()
      Get the base URI for the external catalog.
    • before

      @BeforeEach public void before(org.junit.jupiter.api.TestInfo testInfo)
    • createTestPrincipal

      protected ClientPrincipal createTestPrincipal(PolarisClient client, String principalName, String principalRoleName)
      Creates a test principal with the specified name and role. Subclasses can override this method to customize the principal creation process, e.g. when using federated principals.
    • obtainToken

      protected String obtainToken(PolarisClient client, ClientPrincipal principal)
      Obtain an access token for the given principal credentials.

      By default, this method uses the PolarisClient to obtain the token from the Polaris internal OAuth2 token endpoint.

      Subclasses can override this method to customize the token acquisition process, e.g. when using external identity providers.

    • cleanUp

      @AfterEach public void cleanUp() throws IOException
      Throws:
      IOException
    • cleanUp

      protected void cleanUp(PolarisClient client, String adminToken)
      Cleans up the Polaris environment after each test.

      Subclasses can override this method to perform additional cleanup actions.

    • catalog

      protected org.apache.iceberg.rest.RESTCatalog catalog()
      Specified by:
      catalog in class org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
    • createPolarisCatalog

      protected void createPolarisCatalog(org.apache.polaris.core.admin.model.Catalog catalog)
      Overridable methods to allow subclasses to execute additional logic on catalog creation.
    • initCatalog

      protected org.apache.iceberg.rest.RESTCatalog initCatalog(String catalogName, Map<String,String> additionalProperties)
      Initialize a RESTCatalog for testing.
      Specified by:
      initCatalog in class org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
      Parameters:
      catalogName - this parameter is currently unused.
      additionalProperties - additional properties to apply on top of the default test settings
      Returns:
      a configured instance of RESTCatalog
    • requiresNamespaceCreate

      protected boolean requiresNamespaceCreate()
      Overrides:
      requiresNamespaceCreate in class org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
    • supportsNestedNamespaces

      protected boolean supportsNestedNamespaces()
      Overrides:
      supportsNestedNamespaces in class org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
    • supportsServerSideRetry

      protected boolean supportsServerSideRetry()
      Overrides:
      supportsServerSideRetry in class org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
    • overridesRequestedLocation

      protected boolean overridesRequestedLocation()
      Overrides:
      overridesRequestedLocation in class org.apache.iceberg.catalog.CatalogTests<org.apache.iceberg.rest.RESTCatalog>
    • testListGrantsOnCatalogObjectsToCatalogRoles

      @Test public void testListGrantsOnCatalogObjectsToCatalogRoles()
    • testListGrantsAfterRename

      @Test public void testListGrantsAfterRename()
    • testCreateTableWithOverriddenBaseLocation

      @Test public void testCreateTableWithOverriddenBaseLocation()
    • testCreateTableWithOverriddenBaseLocationCannotOverlapSibling

      @Test public void testCreateTableWithOverriddenBaseLocationCannotOverlapSibling()
    • testCreateTableWithOverriddenBaseLocationMustResideInNsDirectory

      @Test public void testCreateTableWithOverriddenBaseLocationMustResideInNsDirectory()
    • testLoadTableWithAccessDelegationForExternalCatalogWithConfigDisabled

      @Test public void testLoadTableWithAccessDelegationForExternalCatalogWithConfigDisabled()
      Create an EXTERNAL catalog. The test configuration, by default, disables access delegation for EXTERNAL catalogs, so register a table and try to load it with the REST client configured to try to fetch vended credentials. Expect a ForbiddenException.
    • testLoadTableWithoutAccessDelegationForExternalCatalogWithConfigDisabled

      @Test public void testLoadTableWithoutAccessDelegationForExternalCatalogWithConfigDisabled()
      Create an EXTERNAL catalog. The test configuration, by default, disables access delegation for EXTERNAL catalogs. Register a table and attempt to load it WITHOUT access delegation. This should succeed.
    • testLoadTableWithAccessDelegationForExternalCatalogWithConfigEnabledForCatalog

      @Test public void testLoadTableWithAccessDelegationForExternalCatalogWithConfigEnabledForCatalog()
      Create an EXTERNAL catalog. The test configuration, by default, disables access delegation for EXTERNAL catalogs. However, we set enable.credential.vending to true for this catalog, enabling it. Register a table and attempt to load it WITH access delegation. This should succeed.
    • testLoadTableTwiceWithETag

      @Test public void testLoadTableTwiceWithETag()
      Register a table. Then, invoke an initial loadTable request to fetch and ensure ETag is present. Then, invoke a second loadTable to ensure that ETag is matched.
    • testRegisterAndLoadTableWithReturnedETag

      @Test public void testRegisterAndLoadTableWithReturnedETag()
      Invoke an initial registerTable request to fetch and ensure ETag is present. Then, invoke a second loadTable to ensure that ETag is matched.
    • testCreateAndLoadTableWithReturnedEtag

      @Test public void testCreateAndLoadTableWithReturnedEtag()
    • testSendMetricsReport

      @Test public void testSendMetricsReport()
    • testSendNotificationInternalCatalog

      @Test public void testSendNotificationInternalCatalog()
    • diffAgainstSingleTable

      @Test public void diffAgainstSingleTable()
    • multipleDiffsAgainstMultipleTables

      @Test public void multipleDiffsAgainstMultipleTables()
    • multipleDiffsAgainstMultipleTablesLastFails

      @Test public void multipleDiffsAgainstMultipleTablesLastFails()
    • testMultipleConflictingCommitsToSingleTableInTransaction

      @Test public void testMultipleConflictingCommitsToSingleTableInTransaction()
    • testTableExistsStatus

      @Test public void testTableExistsStatus()
    • testDropTableStatus

      @Test public void testDropTableStatus()
    • testViewExistsStatus

      @Test public void testViewExistsStatus()
    • testDropViewStatus

      @Test public void testDropViewStatus()
    • testDropViewWithPurge

      @Test public void testDropViewWithPurge()
    • testRenameViewStatus

      @Test public void testRenameViewStatus()
    • testLoadCredentials

      @Test public void testLoadCredentials()
    • testCreateGenericTable

      @Test public void testCreateGenericTable()
    • testLoadGenericTable

      @Test public void testLoadGenericTable()
    • testListGenericTables

      @Test public void testListGenericTables()
    • testDropGenericTable

      @Test public void testDropGenericTable()
    • testGrantsOnGenericTable

      @Test public void testGrantsOnGenericTable()
    • testGrantsOnNonExistingGenericTable

      @Test public void testGrantsOnNonExistingGenericTable()
    • testDropNonExistingGenericTable

      @Test public void testDropNonExistingGenericTable()
    • testLoadTableWithSnapshots

      @Test public void testLoadTableWithSnapshots()
    • testLoadTableWithRefFiltering

      @Test public void testLoadTableWithRefFiltering()
    • testCreateGenericTableWithReservedProperty

      @Test public void testCreateGenericTableWithReservedProperty()
    • testCreateNamespaceWithReservedProperty

      @Test public void testCreateNamespaceWithReservedProperty()
    • testUpdateNamespaceWithReservedProperty

      @Test public void testUpdateNamespaceWithReservedProperty()
    • testRemoveReservedPropertyFromNamespace

      @Test public void testRemoveReservedPropertyFromNamespace()
    • testCreateTableWithReservedProperty

      @Test public void testCreateTableWithReservedProperty()
    • testUpdateTableWithReservedProperty

      @Test public void testUpdateTableWithReservedProperty()
    • testLoadTableWithNonMatchingIfNoneMatchHeader

      @Test public void testLoadTableWithNonMatchingIfNoneMatchHeader()
    • testLoadTableWithMultipleIfNoneMatchETags

      @Test public void testLoadTableWithMultipleIfNoneMatchETags()
    • testLoadTableWithWildcardIfNoneMatchReturns400

      @Test public void testLoadTableWithWildcardIfNoneMatchReturns400()
    • testLoadNonExistentTableWithIfNoneMatch

      @Test public void testLoadNonExistentTableWithIfNoneMatch()
    • testETagBehaviorForTableSchemaChanges

      @Test public void testETagBehaviorForTableSchemaChanges()
    • testETagBehaviorForTableDropAndRecreateIntegration

      @Test public void testETagBehaviorForTableDropAndRecreateIntegration()
    • testETagChangeAfterDMLOperations

      @Test public void testETagChangeAfterDMLOperations()
    • testPaginatedListNamespaces

      @Test public void testPaginatedListNamespaces()
    • testPaginatedListTables

      @Test public void testPaginatedListTables()
    • testNonPaginatedListTablesViewNamespaces

      @Test public void testNonPaginatedListTablesViewNamespaces()