This is an automated email from the ASF dual-hosted git repository.

mattcasters pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new f3db4dcedb Run the S3FileNameParserIT case as a unit test (#9134)
f3db4dcedb is described below

commit f3db4dcedb897f30309b98d21068803b446b69f6
Author: Sharang Gupta <[email protected]>
AuthorDate: Thu Oct 29 09:10:16 2026 +0000

    Run the S3FileNameParserIT case as a unit test (#9134)
    
    The aws plugin has no failsafe execution, so S3FileNameParserIT never ran.
    It only parses a URI, so move its case into S3FileNameParserTest.
---
 .../apache/hop/vfs/s3/vfs/S3FileNameParserIT.java  | 39 ----------------------
 .../hop/vfs/s3/vfs/S3FileNameParserTest.java       |  9 +++++
 2 files changed, 9 insertions(+), 39 deletions(-)

diff --git 
a/plugins/tech/aws/src/test/java/org/apache/hop/vfs/s3/vfs/S3FileNameParserIT.java
 
b/plugins/tech/aws/src/test/java/org/apache/hop/vfs/s3/vfs/S3FileNameParserIT.java
deleted file mode 100644
index f0228b5dae..0000000000
--- 
a/plugins/tech/aws/src/test/java/org/apache/hop/vfs/s3/vfs/S3FileNameParserIT.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hop.vfs.s3.vfs;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import org.apache.commons.vfs2.provider.FileNameParser;
-import org.apache.hop.vfs.s3.s3.vfs.S3FileName;
-import org.apache.hop.vfs.s3.s3.vfs.S3FileNameParser;
-import org.junit.jupiter.api.Test;
-
-class S3FileNameParserIT {
-
-  @Test
-  void testParseUri_withKeys() throws Exception {
-    FileNameParser parser = S3FileNameParser.getInstance();
-    String origUri = "s3:///fooBucket/rcf-emr-staging";
-    S3FileName filename = (S3FileName) parser.parseUri(null, null, origUri);
-
-    assertEquals("fooBucket", filename.getBucketId());
-
-    assertEquals(origUri, filename.getURI());
-  }
-}
diff --git 
a/plugins/tech/aws/src/test/java/org/apache/hop/vfs/s3/vfs/S3FileNameParserTest.java
 
b/plugins/tech/aws/src/test/java/org/apache/hop/vfs/s3/vfs/S3FileNameParserTest.java
index 05b58f19ed..4aa006e037 100644
--- 
a/plugins/tech/aws/src/test/java/org/apache/hop/vfs/s3/vfs/S3FileNameParserTest.java
+++ 
b/plugins/tech/aws/src/test/java/org/apache/hop/vfs/s3/vfs/S3FileNameParserTest.java
@@ -55,4 +55,13 @@ class S3FileNameParserTest {
     withBaseFile = parser.parseUri(context, fileName, uri);
     assertEquals("s3", ((S3FileName) withBaseFile).getBucketId());
   }
+
+  @Test
+  void testParseUriWithEmptyAuthority() throws Exception {
+    String uri = "s3:///fooBucket/rcf-emr-staging";
+    S3FileName fileName = (S3FileName) parser.parseUri(null, null, uri);
+
+    assertEquals("fooBucket", fileName.getBucketId());
+    assertEquals(uri, fileName.getURI());
+  }
 }

Reply via email to