Skip to content

Commit

Permalink
Merge pull request #12370 from geoand/#12369
Browse files Browse the repository at this point in the history
Always use localhost for @TestHTTPResource
  • Loading branch information
stuartwdouglas committed Sep 29, 2020
2 parents 18dbb17 + 6366e9a commit c9ab9fe
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ public class TestHTTPConfigSourceProvider implements ConfigSourceProvider {

static {
Map<String, String> map = new HashMap<>();
map.put(TEST_URL_KEY, TEST_URL_VALUE);
map.put(TEST_URL_SSL_KEY, TEST_URL_SSL_VALUE);
map.put(TEST_URL_KEY, sanitizeURL(TEST_URL_VALUE));
map.put(TEST_URL_SSL_KEY, sanitizeURL(TEST_URL_SSL_VALUE));
entries = Collections.unmodifiableMap(map);
}

private static String sanitizeURL(String url) {
return url.replace("0.0.0.0", "localhost");
}

public Iterable<ConfigSource> getConfigSources(final ClassLoader forClassLoader) {
return Collections.singletonList(new TestURLConfigSource());
}
Expand Down

0 comments on commit c9ab9fe

Please sign in to comment.