Skip to content

Commit

Permalink
Modified comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Avinash Kumar committed Jul 16, 2024
1 parent 449d405 commit 7ecbeeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ protected String getBucketName(JsonObject parameters, String host) {
*
* @param parameters JsonObject containing ms.source.s3.parameters
* @param host hostname with bucket name in the beginning
* @return the endpoint name without the bucket name
* @return the endpoint name if bucket name is present in the parameters then removes the bucket name from host and
* calls the getEndpointFromHost method to get the endpoint.
*/
@VisibleForTesting
protected String getEndpoint(JsonObject parameters, String host) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public void testEndpoint() {
@Test
public void testEndpointWithoutPeriod() {
S3SourceV2 s3SourceV2 = new S3SourceV2();
JsonObject parameteres =
JsonObject parameters =
new Gson().fromJson("{\"region\" : \"us-east-2\", \"bucket_name\" : \"collect-us-west-2\"}", JsonObject.class);
String host = "collect-us-west-2.s3.amazonaws.com";
String endpoint = s3SourceV2.getEndpoint(parameteres, host);
String endpoint = s3SourceV2.getEndpoint(parameters, host);
Assert.assertEquals(endpoint, "s3.amazonaws.com");
}
}

0 comments on commit 7ecbeeb

Please sign in to comment.