Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Yanlong He <hey.yanlong@gmail.com>
  • Loading branch information
heyanlong committed Dec 12, 2023
1 parent 6a68a0f commit 401de0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected Ec2Client buildClient(
}

protected String getFullEndpoint(String endpoint) {
if (endpoint == null) {
if (!Strings.hasText(endpoint)) {
return null;
}
if (endpoint.startsWith("http")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,7 @@ public void testGetFullEndpointWithoutScheme() {

String endpoint = awsEc2ServiceImpl.getFullEndpoint(clientSettings.endpoint);
assertEquals("https://ec2.us-west-2.amazonaws.com", endpoint);

assertNull(awsEc2ServiceImpl.getFullEndpoint(""));
}
}

0 comments on commit 401de0b

Please sign in to comment.