diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAzureIntegrationTestBase.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAdlsIntegrationTestBase.java similarity index 92% rename from integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAzureIntegrationTestBase.java rename to integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAdlsIntegrationTestBase.java index 923f3592b0..d033b5585f 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAzureIntegrationTestBase.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAdlsIntegrationTestBase.java @@ -23,10 +23,10 @@ import org.apache.polaris.core.admin.model.StorageConfigInfo; /** Runs PolarisRestCatalogIntegrationBase test on Azure. */ -public abstract class PolarisRestCatalogAzureIntegrationTestBase +public abstract class PolarisRestCatalogAdlsIntegrationTestBase extends PolarisRestCatalogIntegrationBase { - public static final String TENANT_ID = System.getenv("INTEGRATION_TEST_AZURE_TENANT_ID"); - public static final String BASE_LOCATION = System.getenv("INTEGRATION_TEST_AZURE_PATH"); + public static final String TENANT_ID = System.getenv("INTEGRATION_TEST_ADLS_TENANT_ID"); + public static final String BASE_LOCATION = System.getenv("INTEGRATION_TEST_ADLS_PATH"); @Override protected StorageConfigInfo getStorageConfigInfo() { diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogGcpIntegrationTestBase.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogGcsIntegrationTestBase.java similarity index 96% rename from integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogGcpIntegrationTestBase.java rename to integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogGcsIntegrationTestBase.java index 381983933f..5990bc7c4e 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogGcpIntegrationTestBase.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogGcsIntegrationTestBase.java @@ -23,7 +23,7 @@ import org.apache.polaris.core.admin.model.StorageConfigInfo; /** Runs PolarisRestCatalogIntegrationBase test on GCP. */ -public abstract class PolarisRestCatalogGcpIntegrationTestBase +public abstract class PolarisRestCatalogGcsIntegrationTestBase extends PolarisRestCatalogIntegrationBase { public static final String SERVICE_ACCOUNT = System.getenv("INTEGRATION_TEST_GCS_SERVICE_ACCOUNT"); diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAwsIntegrationTestBase.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogS3IntegrationTestBase.java similarity index 96% rename from integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAwsIntegrationTestBase.java rename to integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogS3IntegrationTestBase.java index 64bf0f221c..b3b34c6091 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogAwsIntegrationTestBase.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogS3IntegrationTestBase.java @@ -24,7 +24,7 @@ import org.apache.polaris.core.admin.model.StorageConfigInfo; /** Runs PolarisRestCatalogIntegrationBase test on AWS. */ -public abstract class PolarisRestCatalogAwsIntegrationTestBase +public abstract class PolarisRestCatalogS3IntegrationTestBase extends PolarisRestCatalogIntegrationBase { public static final String ROLE_ARN = Optional.ofNullable(System.getenv("INTEGRATION_TEST_ROLE_ARN")) diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAzureIntegrationTest.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAdlsIntegrationTestBase.java similarity index 75% rename from integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAzureIntegrationTest.java rename to integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAdlsIntegrationTestBase.java index 9d2c4d84a2..a2f73d76d7 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAzureIntegrationTest.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAdlsIntegrationTestBase.java @@ -18,29 +18,31 @@ */ package org.apache.polaris.service.it.test; -import com.google.common.base.Strings; +import java.io.File; import java.util.List; -import java.util.stream.Stream; import org.apache.polaris.core.admin.model.AzureStorageConfigInfo; import org.apache.polaris.core.admin.model.StorageConfigInfo; +import org.apache.polaris.core.storage.StorageUtil; /** Runs PolarisRestCatalogViewIntegrationTest on Azure. */ -public class PolarisRestCatalogViewAzureIntegrationTest +public abstract class PolarisRestCatalogViewAdlsIntegrationTestBase extends PolarisRestCatalogViewIntegrationBase { - public static final String TENANT_ID = System.getenv("INTEGRATION_TEST_AZURE_TENANT_ID"); - public static final String BASE_LOCATION = System.getenv("INTEGRATION_TEST_AZURE_PATH"); + public static final String TENANT_ID = System.getenv("INTEGRATION_TEST_ADLS_TENANT_ID"); + public static final String BASE_LOCATION = System.getenv("INTEGRATION_TEST_ADLS_PATH"); @Override protected StorageConfigInfo getStorageConfigInfo() { return AzureStorageConfigInfo.builder() .setTenantId(TENANT_ID) .setStorageType(StorageConfigInfo.StorageTypeEnum.AZURE) - .setAllowedLocations(List.of(BASE_LOCATION)) + .setAllowedLocations( + List.of( + StorageUtil.concatFilePrefixes(BASE_LOCATION, POLARIS_IT_SUBDIR, File.separator))) .build(); } @Override - protected boolean shouldSkip() { - return Stream.of(BASE_LOCATION, TENANT_ID).anyMatch(Strings::isNullOrEmpty); + protected String getCustomMetadataLocationDir() { + return StorageUtil.concatFilePrefixes(BASE_LOCATION, POLARIS_IT_SUBDIR, File.separator); } } diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewFileIntegrationTestBase.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewFileIntegrationTestBase.java index 4b1ae904a1..839be275d8 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewFileIntegrationTestBase.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewFileIntegrationTestBase.java @@ -23,12 +23,14 @@ import org.apache.polaris.core.admin.model.FileStorageConfigInfo; import org.apache.polaris.core.admin.model.StorageConfigInfo; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.io.TempDir; /** Runs PolarisRestCatalogViewIntegrationTest on the local filesystem. */ public abstract class PolarisRestCatalogViewFileIntegrationTestBase extends PolarisRestCatalogViewIntegrationBase { static String baseLocation; + private Path tempDirForCustomMetadataLocation; @BeforeAll public static void setUp(@TempDir Path tempDir) { @@ -39,6 +41,11 @@ public static void setUp(@TempDir Path tempDir) { baseLocation = baseUri; } + @BeforeEach + public void setUpTempDirForCustomMetadata(@TempDir Path tempDir) { + this.tempDirForCustomMetadataLocation = tempDir; + } + @Override protected StorageConfigInfo getStorageConfigInfo() { return FileStorageConfigInfo.builder() @@ -48,7 +55,7 @@ protected StorageConfigInfo getStorageConfigInfo() { } @Override - protected boolean shouldSkip() { - return false; + protected String getCustomMetadataLocationDir() { + return Path.of(tempDirForCustomMetadataLocation.toUri().toString()).toString(); } } diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcpIntegrationTest.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcsIntegrationTestBase.java similarity index 78% rename from integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcpIntegrationTest.java rename to integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcsIntegrationTestBase.java index 3dea04e619..f7e0468571 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcpIntegrationTest.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewGcsIntegrationTestBase.java @@ -18,14 +18,14 @@ */ package org.apache.polaris.service.it.test; -import com.google.common.base.Strings; +import java.io.File; import java.util.List; -import java.util.stream.Stream; import org.apache.polaris.core.admin.model.GcpStorageConfigInfo; import org.apache.polaris.core.admin.model.StorageConfigInfo; +import org.apache.polaris.core.storage.StorageUtil; /** Runs PolarisRestCatalogViewIntegrationTest on GCP. */ -public class PolarisRestCatalogViewGcpIntegrationTest +public abstract class PolarisRestCatalogViewGcsIntegrationTestBase extends PolarisRestCatalogViewIntegrationBase { public static final String SERVICE_ACCOUNT = System.getenv("INTEGRATION_TEST_GCS_SERVICE_ACCOUNT"); @@ -36,12 +36,14 @@ protected StorageConfigInfo getStorageConfigInfo() { return GcpStorageConfigInfo.builder() .setGcsServiceAccount(SERVICE_ACCOUNT) .setStorageType(StorageConfigInfo.StorageTypeEnum.GCS) - .setAllowedLocations(List.of(BASE_LOCATION)) + .setAllowedLocations( + List.of( + StorageUtil.concatFilePrefixes(BASE_LOCATION, POLARIS_IT_SUBDIR, File.separator))) .build(); } @Override - protected boolean shouldSkip() { - return Stream.of(BASE_LOCATION, SERVICE_ACCOUNT).anyMatch(Strings::isNullOrEmpty); + protected String getCustomMetadataLocationDir() { + return StorageUtil.concatFilePrefixes(BASE_LOCATION, POLARIS_IT_SUBDIR, File.separator); } } diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewIntegrationBase.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewIntegrationBase.java index 8cf61a5c44..1c8ce717a4 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewIntegrationBase.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewIntegrationBase.java @@ -23,13 +23,13 @@ import com.google.common.collect.ImmutableMap; import java.lang.reflect.Method; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.Map; import org.apache.iceberg.catalog.TableIdentifier; import org.apache.iceberg.exceptions.ForbiddenException; import org.apache.iceberg.rest.RESTCatalog; import org.apache.iceberg.view.BaseView; import org.apache.iceberg.view.View; +import org.apache.iceberg.view.ViewBuilder; import org.apache.iceberg.view.ViewCatalogTests; import org.apache.polaris.core.admin.model.Catalog; import org.apache.polaris.core.admin.model.CatalogProperties; @@ -45,6 +45,7 @@ import org.apache.polaris.service.it.env.PolarisApiEndpoints; import org.apache.polaris.service.it.env.PolarisClient; import org.apache.polaris.service.it.ext.PolarisIntegrationTestExtension; +import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.Assertions; import org.assertj.core.api.Assumptions; import org.assertj.core.configuration.PreferredAssumptionException; @@ -55,7 +56,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInfo; import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.io.TempDir; /** * Import the full core Iceberg catalog tests by hitting the REST service via the RESTCatalog @@ -86,6 +86,8 @@ public abstract class PolarisRestCatalogViewIntegrationBase extends ViewCatalogT private static PolarisApiEndpoints endpoints; private static PolarisClient client; private static ManagementApi managementApi; + protected static final String POLARIS_IT_SUBDIR = "polaris_it"; + protected static final String POLARIS_IT_CUSTOM_SUBDIR = "polaris_it_custom"; private RESTCatalog restCatalog; @@ -104,8 +106,6 @@ static void close() throws Exception { @BeforeEach public void before(TestInfo testInfo) { - Assumptions.assumeThat(shouldSkip()).isFalse(); - String principalName = client.newEntityName("snowman-rest"); String principalRoleName = client.newEntityName("rest-admin"); PrincipalWithCredentials principalCredentials = @@ -157,12 +157,6 @@ public void cleanUp() { */ protected abstract StorageConfigInfo getStorageConfigInfo(); - /** - * @return Whether the tests should be skipped, for example due to environment variables not being - * specified. - */ - protected abstract boolean shouldSkip(); - @Override protected RESTCatalog catalog() { return restCatalog; @@ -188,33 +182,89 @@ protected boolean overridesRequestedLocation() { return true; } - @Override + protected String getCustomMetadataLocationDir() { + return ""; + } + @Test + @Override public void createViewWithCustomMetadataLocation() { - Assertions.assertThatThrownBy(super::createViewWithCustomMetadataLocation) + TableIdentifier identifier = TableIdentifier.of("ns", "view"); + String baseLocation = catalog().properties().get(CatalogEntity.DEFAULT_BASE_LOCATION_KEY); + if (this.requiresNamespaceCreate()) { + // Use the default baseLocation of the catalog. No "write.metadata.path" set. + catalog().createNamespace(identifier.namespace()); + } + + // Negative test, we cannot create views outside of base location + ((AbstractBooleanAssert) + Assertions.assertThat(this.catalog().viewExists(identifier)) + .as("View should not exist", new Object[0])) + .isFalse(); + ViewBuilder viewBuilder = + catalog() + .buildView(identifier) + .withSchema(SCHEMA) + .withDefaultNamespace(identifier.namespace()) + .withDefaultCatalog(catalog().name()) + .withQuery("spark", "select * from ns.tbl") + .withProperty( + IcebergTableLikeEntity.USER_SPECIFIED_WRITE_METADATA_LOCATION_KEY, + getCustomMetadataLocationDir()) + .withLocation(baseLocation); + Assertions.assertThatThrownBy(viewBuilder::create) .isInstanceOf(ForbiddenException.class) .hasMessageContaining("Forbidden: Invalid locations"); + + // Positive, we can create views in the default base location's subdirectory + String baseViewLocation = catalog().properties().get(CatalogEntity.DEFAULT_BASE_LOCATION_KEY); + String baseCustomWriteMetadataLocation = baseViewLocation + "/custom_location"; + View view = + this.catalog() + .buildView(identifier) + .withSchema(SCHEMA) + .withDefaultNamespace(identifier.namespace()) + .withDefaultCatalog(this.catalog().name()) + .withQuery("spark", "select * from ns.tbl") + .withProperty("write.metadata.path", baseCustomWriteMetadataLocation) + .withLocation(baseViewLocation) + .create(); + Assertions.assertThat(view).isNotNull(); + ((AbstractBooleanAssert) + Assertions.assertThat(this.catalog().viewExists(identifier)) + .as("View should exist", new Object[0])) + .isTrue(); + Assertions.assertThat(view.properties()) + .containsEntry("write.metadata.path", baseCustomWriteMetadataLocation); + + Assertions.assertThat(((BaseView) view).operations().current().metadataFileLocation()) + .isNotNull(); + // Normalize paths, remove schema before comparing + String metadataFileLocationPath = + Path.of(((BaseView) view).operations().current().metadataFileLocation()).toUri().getPath(); + String baseCustomWriteMetadataLocationPath = + Path.of(baseCustomWriteMetadataLocation).toUri().getPath(); + Assertions.assertThat(metadataFileLocationPath).startsWith(baseCustomWriteMetadataLocationPath); } @Test - public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path tempDir) { + public void createViewWithCustomMetadataLocationInheritedFromNamespace() { TableIdentifier identifier = TableIdentifier.of("ns", "view"); - - String location = Paths.get(tempDir.toUri().toString()).toString(); - String customLocation = Paths.get(tempDir.toUri().toString(), "custom-location").toString(); - String customLocation2 = Paths.get(tempDir.toUri().toString(), "custom-location2").toString(); - String customLocationChild = - Paths.get(tempDir.toUri().toString(), "custom-location/child").toString(); - - catalog() - .createNamespace( - identifier.namespace(), - ImmutableMap.of( - IcebergTableLikeEntity.USER_SPECIFIED_WRITE_METADATA_LOCATION_KEY, location)); - + String viewBaseLocation = getCustomMetadataLocationDir(); + String customWriteMetadataLocation = viewBaseLocation + "/custom-location"; + String customWriteMetadataLocation2 = viewBaseLocation + "/custom-location2"; + String customWriteMetadataLocationChild = viewBaseLocation + "/custom-location/child"; + if (this.requiresNamespaceCreate()) { + // Views can inherit the namespace's "write.metadata.path" setting in Polaris. + catalog() + .createNamespace( + identifier.namespace(), + ImmutableMap.of( + IcebergTableLikeEntity.USER_SPECIFIED_WRITE_METADATA_LOCATION_KEY, + viewBaseLocation)); + } Assertions.assertThat(catalog().viewExists(identifier)).as("View should not exist").isFalse(); - - // CAN create a view with a custom metadata location `baseLocation/customLocation`, + // CAN create a view with a custom metadata location `viewLocation/customLocation`, // as long as the location is within the parent namespace's `write.metadata.path=baseLocation` View view = catalog() @@ -224,17 +274,17 @@ public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path tempD .withDefaultCatalog(catalog().name()) .withQuery("spark", "select * from ns.tbl") .withProperty( - IcebergTableLikeEntity.USER_SPECIFIED_WRITE_METADATA_LOCATION_KEY, customLocation) - .withLocation(location) + IcebergTableLikeEntity.USER_SPECIFIED_WRITE_METADATA_LOCATION_KEY, + customWriteMetadataLocation) + .withLocation(viewBaseLocation) .create(); - Assertions.assertThat(view).isNotNull(); Assertions.assertThat(catalog().viewExists(identifier)).as("View should exist").isTrue(); - Assertions.assertThat(view.properties()).containsEntry("write.metadata.path", customLocation); + Assertions.assertThat(view.properties()) + .containsEntry("write.metadata.path", customWriteMetadataLocation); Assertions.assertThat(((BaseView) view).operations().current().metadataFileLocation()) .isNotNull() - .startsWith(customLocation); - + .startsWith(customWriteMetadataLocation); // CANNOT update the view with a new metadata location `baseLocation/customLocation2`, // even though the new location is still under the parent namespace's // `write.metadata.path=baseLocation`. @@ -245,11 +295,10 @@ public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path tempD .updateProperties() .set( IcebergTableLikeEntity.USER_SPECIFIED_WRITE_METADATA_LOCATION_KEY, - customLocation2) + customWriteMetadataLocation2) .commit()) .isInstanceOf(ForbiddenException.class) .hasMessageContaining("Forbidden: Invalid locations"); - // CANNOT update the view with a child metadata location `baseLocation/customLocation/child`, // even though it is a subpath of the original view's // `write.metadata.path=baseLocation/customLocation`. @@ -260,7 +309,7 @@ public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path tempD .updateProperties() .set( IcebergTableLikeEntity.USER_SPECIFIED_WRITE_METADATA_LOCATION_KEY, - customLocationChild) + customWriteMetadataLocationChild) .commit()) .isInstanceOf(ForbiddenException.class) .hasMessageContaining("Forbidden: Invalid locations"); diff --git a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAwsIntegrationTest.java b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewS3IntegrationTestBase.java similarity index 79% rename from integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAwsIntegrationTest.java rename to integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewS3IntegrationTestBase.java index 63471c92b4..56c01b5402 100644 --- a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewAwsIntegrationTest.java +++ b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogViewS3IntegrationTestBase.java @@ -18,15 +18,15 @@ */ package org.apache.polaris.service.it.test; -import com.google.common.base.Strings; +import java.io.File; import java.util.List; import java.util.Optional; -import java.util.stream.Stream; import org.apache.polaris.core.admin.model.AwsStorageConfigInfo; import org.apache.polaris.core.admin.model.StorageConfigInfo; +import org.apache.polaris.core.storage.StorageUtil; /** Runs PolarisRestCatalogViewIntegrationTest on AWS. */ -public class PolarisRestCatalogViewAwsIntegrationTest +public abstract class PolarisRestCatalogViewS3IntegrationTestBase extends PolarisRestCatalogViewIntegrationBase { public static final String ROLE_ARN = Optional.ofNullable(System.getenv("INTEGRATION_TEST_ROLE_ARN")) // Backward compatibility @@ -38,12 +38,14 @@ protected StorageConfigInfo getStorageConfigInfo() { return AwsStorageConfigInfo.builder() .setRoleArn(ROLE_ARN) .setStorageType(StorageConfigInfo.StorageTypeEnum.S3) - .setAllowedLocations(List.of(BASE_LOCATION)) + .setAllowedLocations( + List.of( + StorageUtil.concatFilePrefixes(BASE_LOCATION, POLARIS_IT_SUBDIR, File.separator))) .build(); } @Override - protected boolean shouldSkip() { - return Stream.of(BASE_LOCATION, ROLE_ARN).anyMatch(Strings::isNullOrEmpty); + protected String getCustomMetadataLocationDir() { + return StorageUtil.concatFilePrefixes(BASE_LOCATION, POLARIS_IT_SUBDIR, File.separator); } } diff --git a/runtime/service/README.md b/runtime/service/README.md index 7d499b993f..52c37199cb 100644 --- a/runtime/service/README.md +++ b/runtime/service/README.md @@ -29,10 +29,10 @@ export INTEGRATION_TEST_S3_PATH="s3://bucket/subpath" export INTEGRATION_TEST_S3_ROLE_ARN="your-role-arn" ./gradlew :polaris-runtime-service:cloudTest ``` -For Azure: +For ADLS: ```shell -export INTEGRATION_TEST_AZURE_PATH="abfss://bucket/subpath" -export INTEGRATION_TEST_AZURE_TENANT_ID="your-tenant-id" +export INTEGRATION_TEST_ADLS_PATH="abfss://bucket/subpath" +export INTEGRATION_TEST_ADLS_TENANT_ID="your-tenant-id" ./gradlew :polaris-runtime-service:cloudTest ``` For GCS: diff --git a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAzureIT.java b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAdlsIT.java similarity index 79% rename from runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAzureIT.java rename to runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAdlsIT.java index d89bbf22d9..facc37c424 100644 --- a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAzureIT.java +++ b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAdlsIT.java @@ -19,9 +19,9 @@ package org.apache.polaris.service.it; import io.quarkus.test.junit.QuarkusIntegrationTest; -import org.apache.polaris.service.it.test.PolarisRestCatalogAzureIntegrationTestBase; +import org.apache.polaris.service.it.test.PolarisRestCatalogAdlsIntegrationTestBase; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; @QuarkusIntegrationTest -@EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_AZURE_PATH", matches = ".+") -public class RestCatalogAzureIT extends PolarisRestCatalogAzureIntegrationTestBase {} +@EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_ADLS_PATH", matches = ".+") +public class RestCatalogAdlsIT extends PolarisRestCatalogAdlsIntegrationTestBase {} diff --git a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogGcpIT.java b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogGcsIT.java similarity index 89% rename from runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogGcpIT.java rename to runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogGcsIT.java index 80448f0c2a..c098d0ba3b 100644 --- a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogGcpIT.java +++ b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogGcsIT.java @@ -19,9 +19,9 @@ package org.apache.polaris.service.it; import io.quarkus.test.junit.QuarkusIntegrationTest; -import org.apache.polaris.service.it.test.PolarisRestCatalogGcpIntegrationTestBase; +import org.apache.polaris.service.it.test.PolarisRestCatalogGcsIntegrationTestBase; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; @QuarkusIntegrationTest @EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_GCS_PATH", matches = ".+") -public class RestCatalogGcpIT extends PolarisRestCatalogGcpIntegrationTestBase {} +public class RestCatalogGcsIT extends PolarisRestCatalogGcsIntegrationTestBase {} diff --git a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAwsIT.java b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogS3IT.java similarity index 86% rename from runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAwsIT.java rename to runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogS3IT.java index a229c1c167..6e6f9d9669 100644 --- a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogAwsIT.java +++ b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogS3IT.java @@ -19,9 +19,9 @@ package org.apache.polaris.service.it; import io.quarkus.test.junit.QuarkusIntegrationTest; -import org.apache.polaris.service.it.test.PolarisRestCatalogAwsIntegrationTestBase; +import org.apache.polaris.service.it.test.PolarisRestCatalogS3IntegrationTestBase; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; @QuarkusIntegrationTest @EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_S3_PATH", matches = ".+") -public class RestCatalogAwsIT extends PolarisRestCatalogAwsIntegrationTestBase {} +public class RestCatalogS3IT extends PolarisRestCatalogS3IntegrationTestBase {} diff --git a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAzureIT.java b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAdlsIT.java similarity index 88% rename from runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAzureIT.java rename to runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAdlsIT.java index 38a83c83fa..46b8f09669 100644 --- a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAzureIT.java +++ b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAdlsIT.java @@ -22,14 +22,14 @@ import java.lang.reflect.Field; import java.nio.file.Path; import org.apache.iceberg.view.ViewCatalogTests; -import org.apache.polaris.service.it.test.PolarisRestCatalogViewAzureIntegrationTest; +import org.apache.polaris.service.it.test.PolarisRestCatalogViewAdlsIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import org.junit.jupiter.api.io.TempDir; @QuarkusIntegrationTest -@EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_AZURE_PATH", matches = ".+") -public class RestCatalogViewAzureIT extends PolarisRestCatalogViewAzureIntegrationTest { +@EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_ADLS_PATH", matches = ".+") +public class RestCatalogViewAdlsIT extends PolarisRestCatalogViewAdlsIntegrationTestBase { @BeforeEach public void setUpTempDir(@TempDir Path tempDir) throws Exception { diff --git a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcpIT.java b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcsIT.java similarity index 93% rename from runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcpIT.java rename to runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcsIT.java index 1eca3ecc32..36c48b0896 100644 --- a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcpIT.java +++ b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewGcsIT.java @@ -22,14 +22,14 @@ import java.lang.reflect.Field; import java.nio.file.Path; import org.apache.iceberg.view.ViewCatalogTests; -import org.apache.polaris.service.it.test.PolarisRestCatalogViewGcpIntegrationTest; +import org.apache.polaris.service.it.test.PolarisRestCatalogViewGcsIntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import org.junit.jupiter.api.io.TempDir; @QuarkusIntegrationTest @EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_GCS_PATH", matches = ".+") -public class RestCatalogViewGcpIT extends PolarisRestCatalogViewGcpIntegrationTest { +public class RestCatalogViewGcsIT extends PolarisRestCatalogViewGcsIntegrationTestBase { @BeforeEach public void setUpTempDir(@TempDir Path tempDir) throws Exception { diff --git a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAwsIT.java b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewS3IT.java similarity index 93% rename from runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAwsIT.java rename to runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewS3IT.java index de6cfb387e..65bc1e687a 100644 --- a/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewAwsIT.java +++ b/runtime/service/src/cloudTest/java/org/apache/polaris/service/it/RestCatalogViewS3IT.java @@ -22,14 +22,14 @@ import java.lang.reflect.Field; import java.nio.file.Path; import org.apache.iceberg.view.ViewCatalogTests; -import org.apache.polaris.service.it.test.PolarisRestCatalogViewAwsIntegrationTest; +import org.apache.polaris.service.it.test.PolarisRestCatalogViewS3IntegrationTestBase; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import org.junit.jupiter.api.io.TempDir; @QuarkusIntegrationTest @EnabledIfEnvironmentVariable(named = "INTEGRATION_TEST_S3_PATH", matches = ".+") -public class RestCatalogViewAwsIT extends PolarisRestCatalogViewAwsIntegrationTest { +public class RestCatalogViewS3IT extends PolarisRestCatalogViewS3IntegrationTestBase { @BeforeEach public void setUpTempDir(@TempDir Path tempDir) throws Exception {