Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@
package org.apache.polaris.service.it.test;

import com.google.common.base.Strings;
import java.nio.file.Path;
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.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.io.TempDir;

/** Runs PolarisRestCatalogViewIntegrationTest on Azure. */
public abstract class PolarisRestCatalogViewAdlsIntegrationTestBase
Expand All @@ -43,4 +46,29 @@ protected StorageConfigInfo getStorageConfigInfo() {
protected boolean shouldSkip() {
return Stream.of(BASE_LOCATION, TENANT_ID).anyMatch(Strings::isNullOrEmpty);
}

/**
* Disable tests that use @TempDir from ViewCatalogTests (Iceberg base class). These tests are
* disabled for now because they use @TempDir which internally goes through Paths.get, and we
* cannot make it point to a cloud storage path at the moment.
*/
@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void completeCreateView() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createViewWithCustomMetadataLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createAndReplaceViewWithLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void updateViewLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path tempDir) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@
package org.apache.polaris.service.it.test;

import com.google.common.base.Strings;
import java.nio.file.Path;
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.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.io.TempDir;

/** Runs PolarisRestCatalogViewIntegrationTest on GCP. */
public abstract class PolarisRestCatalogViewGcsIntegrationTestBase
Expand All @@ -44,4 +47,29 @@ protected StorageConfigInfo getStorageConfigInfo() {
protected boolean shouldSkip() {
return Stream.of(BASE_LOCATION, SERVICE_ACCOUNT).anyMatch(Strings::isNullOrEmpty);
}

/**
* Disable tests that use @TempDir from ViewCatalogTests (Iceberg base class). These tests are
* disabled for now because they use @TempDir which internally goes through Paths.get, and we
* cannot make it point to a cloud storage path at the moment.
*/
@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void completeCreateView() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createViewWithCustomMetadataLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createAndReplaceViewWithLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void updateViewLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path tempDir) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
package org.apache.polaris.service.it.test;

import com.google.common.base.Strings;
import java.nio.file.Path;
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.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.io.TempDir;

/** Runs PolarisRestCatalogViewIntegrationTest on AWS. */
public abstract class PolarisRestCatalogViewS3IntegrationTestBase
Expand All @@ -46,4 +49,29 @@ protected StorageConfigInfo getStorageConfigInfo() {
protected boolean shouldSkip() {
return Stream.of(BASE_LOCATION, ROLE_ARN).anyMatch(Strings::isNullOrEmpty);
}

/**
* Disable tests that use @TempDir from ViewCatalogTests (Iceberg base class). These tests are
* disabled for now because they use @TempDir which internally goes through Paths.get, and we
* cannot make it point to a cloud storage path at the moment.
*/
@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void completeCreateView() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createViewWithCustomMetadataLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createAndReplaceViewWithLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void updateViewLocation() {}

@Disabled("Test uses @TempDir which cannot point to cloud storage paths")
@Override
public void createViewWithCustomMetadataLocationUsingPolaris(@TempDir Path tempDir) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,9 @@
package org.apache.polaris.service.it;

import io.quarkus.test.junit.QuarkusIntegrationTest;
import java.lang.reflect.Field;
import java.nio.file.Path;
import org.apache.iceberg.view.ViewCatalogTests;
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 RestCatalogViewAdlsIT extends PolarisRestCatalogViewAdlsIntegrationTestBase {

@BeforeEach
public void setUpTempDir(@TempDir Path tempDir) throws Exception {
// see https://github.com/quarkusio/quarkus/issues/13261
Field field = ViewCatalogTests.class.getDeclaredField("tempDir");
field.setAccessible(true);
field.set(this, tempDir);
}
}
public class RestCatalogViewAdlsIT extends PolarisRestCatalogViewAdlsIntegrationTestBase {}
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,9 @@
package org.apache.polaris.service.it;

import io.quarkus.test.junit.QuarkusIntegrationTest;
import java.lang.reflect.Field;
import java.nio.file.Path;
import org.apache.iceberg.view.ViewCatalogTests;
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 RestCatalogViewGcsIT extends PolarisRestCatalogViewGcsIntegrationTestBase {

@BeforeEach
public void setUpTempDir(@TempDir Path tempDir) throws Exception {
// see https://github.com/quarkusio/quarkus/issues/13261
Field field = ViewCatalogTests.class.getDeclaredField("tempDir");
field.setAccessible(true);
field.set(this, tempDir);
}
}
public class RestCatalogViewGcsIT extends PolarisRestCatalogViewGcsIntegrationTestBase {}
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,9 @@
package org.apache.polaris.service.it;

import io.quarkus.test.junit.QuarkusIntegrationTest;
import java.lang.reflect.Field;
import java.nio.file.Path;
import org.apache.iceberg.view.ViewCatalogTests;
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 RestCatalogViewS3IT extends PolarisRestCatalogViewS3IntegrationTestBase {

@BeforeEach
public void setUpTempDir(@TempDir Path tempDir) throws Exception {
// see https://github.com/quarkusio/quarkus/issues/13261
Field field = ViewCatalogTests.class.getDeclaredField("tempDir");
field.setAccessible(true);
field.set(this, tempDir);
}
}
public class RestCatalogViewS3IT extends PolarisRestCatalogViewS3IntegrationTestBase {}