Skip to content

Commit 2c6ab38

Browse files
committed
tidy up of files
1 parent 05d8d03 commit 2c6ab38

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ Developer forum for [docker-java](https://groups.google.com/forum/?hl=de#!forum/
1515
* Java 1.6
1616
* Maven 3.0.5
1717
* Docker daemon running
18-
* Docker private repository running (see below).
19-
20-
You'll need to be running a local private registry, as per [these instructions](docker-auth-registry/README.md):
2118

2219
If you need SSL, then you'll need to put your `*.pem` file into `~/.docker/`, if you're using boot2docker, do this:
2320

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
package com.github.dockerjava.api.model;
22

3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
35
public class ErrorDetail {
6+
@JsonProperty
7+
private String message;
8+
9+
public String getMessage() {
10+
return message;
11+
}
412
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
package com.github.dockerjava.api.model;
22

3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
35
public class ErrorResponse {
6+
@JsonProperty
7+
private ErrorDetail errorDetail;
8+
@JsonProperty
9+
private String error;
10+
11+
public ErrorDetail getErrorDetail() {
12+
return errorDetail;
13+
}
14+
15+
public String getError() {
16+
return error;
17+
}
418
}

src/test/java/com/github/dockerjava/client/AbstractDockerClientTest.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ public void beforeTest() {
4747
}
4848

4949
private DockerClientConfig config() {
50-
return config(DOCKER_JAVA);
50+
return config(null);
5151
}
5252

5353
protected DockerClientConfig config(String password) {
54-
return DockerClientConfig.createDefaultConfigBuilder()
55-
.withServerAddress("http://localhost:5001")
56-
.withUsername(DOCKER_JAVA)
57-
.withPassword(password)
58-
.withEmail(DOCKER_JAVA + "@github.com")
54+
DockerClientConfig.DockerClientConfigBuilder builder = DockerClientConfig.createDefaultConfigBuilder()
55+
.withServerAddress("https://index.docker.io/v1/");
56+
if (password!=null) {
57+
builder = builder.withPassword(password);
58+
}
59+
return builder
5960
.build();
6061
}
6162

0 commit comments

Comments
 (0)