Skip to content

Commit

Permalink
Remove quick test to figure out local dev issue
Browse files Browse the repository at this point in the history
  • Loading branch information
williamrandolph committed Dec 1, 2023
1 parent 94b549c commit de4c0ba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static String getIpFromPublishAddress(String publishAddress) {
return publishAddress;
}

public static InetAddress getInetAddressFromString(String address) throws Exception {
private static InetAddress getInetAddressFromString(String address) throws Exception {
URI uri = new URI("http://" + address);
return InetAddress.getByName(uri.getHost());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import static org.elasticsearch.xpack.security.enrollment.ExternalEnrollmentTokenGenerator.getFilteredAddresses;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.notNullValue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
Expand Down Expand Up @@ -545,10 +544,6 @@ public void testGetFilteredAddresses() throws Exception {
assertThat(ex.getMessage(), Matchers.containsString("nldfnbndflbnl"));
}

public void testInetAddressValidation() throws Exception {
assertThat(BaseEnrollmentTokenGenerator.getInetAddressFromString("nldfnbndflbnl"), notNullValue());
}

private Map<String, String> getDecoded(String token) throws IOException {
final String jsonString = new String(Base64.getDecoder().decode(token), StandardCharsets.UTF_8);
try (XContentParser parser = createParser(JsonXContent.jsonXContent, jsonString)) {
Expand Down

0 comments on commit de4c0ba

Please sign in to comment.