Skip to content

Commit 9a937a3

Browse files
committed
Adjust the docker api version exception type
1 parent fe2c5ee commit 9a937a3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public class RemoteApiVersion implements Serializable {
8080
public static final RemoteApiVersion VERSION_1_26 = RemoteApiVersion.create(1, 26);
8181
public static final RemoteApiVersion VERSION_1_27 = RemoteApiVersion.create(1, 27);
8282
public static final RemoteApiVersion VERSION_1_29 = RemoteApiVersion.create(1, 29);
83+
public static final RemoteApiVersion VERSION_1_30 = RemoteApiVersion.create(1, 30);
8384

8485

8586
/**

src/test/java/com/github/dockerjava/cmd/PullImageCmdIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void testPullImageWithNoAuth() throws Exception {
133133
String imgName = RegistryUtils.createPrivateImage(dockerRule, "pull-image-with-no-auth");
134134

135135
if (isNotSwarm(dockerRule.getClient()) && getVersion(dockerRule.getClient())
136-
.isGreater(RemoteApiVersion.VERSION_1_27)) {
136+
.isGreaterOrEqual(RemoteApiVersion.VERSION_1_30)) {
137137
exception.expect(InternalServerErrorException.class);
138138
} else {
139139
exception.expect(DockerClientException.class);
@@ -158,7 +158,7 @@ public void testPullImageWithInvalidAuth() throws Exception {
158158
String imgName = RegistryUtils.createPrivateImage(dockerRule, "pull-image-with-invalid-auth");
159159

160160
if (isNotSwarm(dockerRule.getClient()) && getVersion(dockerRule.getClient())
161-
.isGreater(RemoteApiVersion.VERSION_1_27)) {
161+
.isGreaterOrEqual(RemoteApiVersion.VERSION_1_30)) {
162162
exception.expect(InternalServerErrorException.class);
163163
} else {
164164
exception.expect(DockerClientException.class);

src/test/java/com/github/dockerjava/utils/RegistryUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static String createPrivateImage(DockerRule dockerRule, String tagName) t
100100
dockerRule.getClient().removeImageCmd(imgNameWithTag)
101101
.exec();
102102

103-
//ensures that the image is available
103+
//ensures that the image is available, the private registry needs some time to reflect a tag push
104104
Thread.sleep(5000);
105105

106106
return imgNameWithTag;

0 commit comments

Comments
 (0)