Skip to content

Commit 01d432f

Browse files
committed
Rename withServerAddress to withRegistryAddress.
This is more correct as auth used only for pull/push operations.
1 parent 43feaf1 commit 01d432f

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

src/main/java/com/github/dockerjava/api/model/AuthConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public String getServerAddress() {
6363
return serverAddress;
6464
}
6565

66-
public AuthConfig withServerAddress(String serverAddress) {
66+
public AuthConfig withRegistryAddres(String serverAddress) {
6767
this.serverAddress = serverAddress;
6868
return this;
6969
}

src/main/java/com/github/dockerjava/core/AuthConfigFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public static AuthConfigFile loadConfig(File confFile) throws IOException {
112112
AuthConfig authConfig = entry.getValue();
113113
decodeAuth(authConfig.getAuth(), authConfig);
114114
authConfig.withAuth(null);
115-
authConfig.withServerAddress(entry.getKey());
115+
authConfig.withRegistryAddres(entry.getKey());
116116
configFile.addConfig(authConfig);
117117
}
118118
} else {

src/main/java/com/github/dockerjava/core/DockerClientConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ && getRegistryUrl() != null) {
282282
.withUsername(getRegistryUsername())
283283
.withPassword(getRegistryPassword())
284284
.withEmail(getRegistryEmail())
285-
.withServerAddress(getRegistryUrl());
285+
.withRegistryAddres(getRegistryUrl());
286286
}
287287
return authConfig;
288288
}

src/main/java/com/github/dockerjava/core/DockerClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public AuthConfig authConfig() {
168168
.withUsername(dockerClientConfig.getRegistryUsername())
169169
.withPassword(dockerClientConfig.getRegistryPassword())
170170
.withEmail(dockerClientConfig.getRegistryEmail())
171-
.withServerAddress(dockerClientConfig.getRegistryUrl());
171+
.withRegistryAddres(dockerClientConfig.getRegistryUrl());
172172
}
173173

174174
/**

src/test/java/com/github/dockerjava/api/model/AuthConfigTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void setUp() throws Exception {
1414
authConfig = new AuthConfig()
1515
.withEmail("foo")
1616
.withPassword("bar")
17-
.withServerAddress("baz")
17+
.withRegistryAddres("baz")
1818
.withUsername("qux");
1919
}
2020

src/test/java/com/github/dockerjava/core/AuthConfigFileTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ public void validJson() throws IOException {
5252
.withEmail("foo@example.com")
5353
.withUsername("foo")
5454
.withPassword("bar")
55-
.withServerAddress("quay.io");
55+
.withRegistryAddres("quay.io");
5656

5757
AuthConfig authConfig2 = new AuthConfig()
5858
.withEmail("moo@example.com")
5959
.withUsername("foo1")
6060
.withPassword("bar1")
61-
.withServerAddress(AuthConfig.DEFAULT_SERVER_ADDRESS);
61+
.withRegistryAddres(AuthConfig.DEFAULT_SERVER_ADDRESS);
6262

6363
AuthConfigFile expected = new AuthConfigFile();
6464
expected.addConfig(authConfig1);
@@ -74,7 +74,7 @@ public void validLegacy() throws IOException {
7474
.withEmail("foo@example.com")
7575
.withUsername("foo")
7676
.withPassword("bar")
77-
.withServerAddress(AuthConfig.DEFAULT_SERVER_ADDRESS);
77+
.withRegistryAddres(AuthConfig.DEFAULT_SERVER_ADDRESS);
7878

7979
AuthConfigFile expected = new AuthConfigFile();
8080
expected.addConfig(authConfig);

src/test/java/com/github/dockerjava/core/command/BuildImageCmdImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public void testBuildFromPrivateRegistry() throws Exception {
279279
.withUsername("testuser")
280280
.withPassword("testpassword")
281281
.withEmail("foo@bar.de")
282-
.withServerAddress("localhost:5000");
282+
.withRegistryAddres("localhost:5000");
283283

284284
dockerClient.authCmd().withAuthConfig(authConfig).exec();
285285
dockerClient.tagImageCmd("busybox:latest", "localhost:5000/testuser/busybox", "latest").withForce().exec();

src/test/java/com/github/dockerjava/netty/exec/BuildImageCmdExecTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public void testBuildFromPrivateRegistry() throws Exception {
271271
.withUsername("testuser")
272272
.withPassword("testpassword")
273273
.withEmail("foo@bar.de")
274-
.withServerAddress("localhost:5000");
274+
.withRegistryAddres("localhost:5000");
275275

276276
dockerClient.authCmd().withAuthConfig(authConfig).exec();
277277
dockerClient.tagImageCmd("busybox:latest", "localhost:5000/testuser/busybox", "latest").withForce().exec();

0 commit comments

Comments
 (0)