Skip to content

Commit 5f6b503

Browse files
committed
Rename external-uri to external-url.
#12508 (review) Fixes #12491
1 parent cb24cad commit 5f6b503

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

java/src/org/openqa/selenium/grid/server/BaseServerFlags.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public class BaseServerFlags implements HasRoles {
3434
private static final String SERVER_SECTION = "server";
3535

3636
@Parameter(
37-
names = {"--external-uri"},
38-
description = "External URI where component is generally available. " +
37+
names = {"--external-url"},
38+
description = "External URL where component is generally available. " +
3939
"Useful on complex network topologies when components are on different networks " +
4040
"and proxy servers are involved.")
41-
@ConfigValue(section = SERVER_SECTION, name = "external-uri", example = "http://10.0.1.1:33333")
42-
private String externalUri;
41+
@ConfigValue(section = SERVER_SECTION, name = "external-url", example = "http://10.0.1.1:33333")
42+
private String externalUrl;
4343

4444
@Parameter(
4545
names = {"--host"},

java/src/org/openqa/selenium/grid/server/BaseServerOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public int getMaxServerThreads() {
8484

8585
@ManagedAttribute(name = "Uri")
8686
public URI getExternalUri() {
87-
return config.get(SERVER_SECTION, "external-uri")
87+
return config.get(SERVER_SECTION, "external-url")
8888
.map(url -> {
8989
try {
9090
return new URI(url);

java/test/org/openqa/selenium/grid/server/BaseServerOptionsTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ void serverConfigBindsToHostByDefault() {
5050
@Test
5151
void externalUriFailsForNonUriStrings() {
5252
BaseServerOptions options =
53-
new BaseServerOptions(new MapConfig(Map.of("server", Map.of("external-uri", "not a uri"))));
53+
new BaseServerOptions(new MapConfig(Map.of("server", Map.of("external-url", "not a URL"))));
5454

5555
Exception exception = assertThrows(RuntimeException.class, () -> {
5656
options.getExternalUri();
5757
});
5858

59-
assertThat(exception.getMessage()).as("External URI must be parseable as URI.").isEqualTo("Supplied external URI is invalid: Illegal character in path at index 3: not a uri");
59+
assertThat(exception.getMessage()).as("External URI must be parseable as URI.").isEqualTo("Supplied external URI is invalid: Illegal character in path at index 3: not a URL");
6060
}
6161

6262
@Test
@@ -65,7 +65,7 @@ void externalUriTakesPriorityOverDefaults() throws URISyntaxException {
6565

6666
BaseServerOptions options =
6767
new BaseServerOptions(new MapConfig(Map.of("server", Map.of(
68-
"external-uri", expected.toString(),
68+
"external-url", expected.toString(),
6969
"host", "localhost",
7070
"port", 5555
7171
))));

0 commit comments

Comments
 (0)