Skip to content

Commit 53989d4

Browse files
committed
* Renamed PolarisS3InteroperabilityTest
* Add verification of `withoutScheme` method in S3LocationTest
1 parent a971766 commit 53989d4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

polaris-core/src/test/java/org/apache/polaris/core/storage/aws/S3LocationTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ class S3LocationTest {
2929
@ParameterizedTest
3030
@ValueSource(strings = {"s3a", "s3"})
3131
public void testLocation(String scheme) {
32-
StorageLocation loc = StorageLocation.of(scheme + "://bucket/schema1/table1");
32+
String locInput = scheme + "://bucket/schema1/table1";
33+
StorageLocation loc = StorageLocation.of(locInput);
3334
Assertions.assertThat(loc).isInstanceOf(S3Location.class);
3435
S3Location s3Loc = (S3Location) loc;
3536
Assertions.assertThat(s3Loc.getScheme()).isEqualTo(scheme);
3637
Assertions.assertThat(s3Loc.getObjectKeyWBucket()).isEqualTo("bucket/schema1/table1");
38+
Assertions.assertThat(s3Loc.withoutScheme()).doesNotStartWith(scheme);
39+
Assertions.assertThat(scheme + ":" + s3Loc.withoutScheme()).isEqualTo(locInput);
3740
}
3841

3942
@ParameterizedTest
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import org.junit.jupiter.params.provider.CsvSource;
4949
import org.junit.jupiter.params.provider.ValueSource;
5050

51-
public class PolarisS3InterOperabilityTest {
51+
public class PolarisS3InteroperabilityTest {
5252

5353
private static final String BASE_LOCATION = "://bucket1/base";
5454
private static final Map<String, Object> SERVER_CONFIG =
@@ -74,7 +74,7 @@ private static String makeTableLocation(
7474
return "%s%s/%s/%s/%s".formatted(scheme, BASE_LOCATION, catalogName, namespace, tableName);
7575
}
7676

77-
public PolarisS3InterOperabilityTest() {
77+
public PolarisS3InteroperabilityTest() {
7878
TestServices.FileIOFactorySupplier fileIOFactorySupplier =
7979
(entityManagerFactory, metaStoreManagerFactory, configurationStore) ->
8080
(FileIOFactory)

0 commit comments

Comments
 (0)