Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit af891e2

Browse filesBrowse files
committed
Fix test for 1.24
1 parent a68cf85 commit af891e2
Copy full SHA for af891e2

3 files changed

+16Lines changed: 16 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/main/java/com/github/dockerjava/api/DockerClient.java‎

Copy file name to clipboardExpand all lines: src/main/java/com/github/dockerjava/api/DockerClient.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ public interface DockerClient extends Closeable {
170170
* @return created command
171171
* @see #copyArchiveFromContainerCmd(String, String)
172172
* @deprecated since docker API version 1.20, replaced by {@link #copyArchiveFromContainerCmd(String, String)}
173+
* since 1.24 fails.
173174
*/
174175
@Deprecated
175176
CopyFileFromContainerCmd copyFileFromContainerCmd(@Nonnull String containerId, @Nonnull String resource);
Collapse file

‎src/test/java/com/github/dockerjava/core/command/CopyFileFromContainerCmdImplTest.java‎

Copy file name to clipboardExpand all lines: src/test/java/com/github/dockerjava/core/command/CopyFileFromContainerCmdImplTest.java
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
package com.github.dockerjava.core.command;
22

3+
import static com.github.dockerjava.utils.TestUtils.getVersion;
34
import static org.hamcrest.MatcherAssert.assertThat;
45
import static org.hamcrest.Matchers.isEmptyOrNullString;
56
import static org.hamcrest.Matchers.not;
67

78
import java.io.InputStream;
89
import java.lang.reflect.Method;
910

11+
import com.github.dockerjava.core.RemoteApiVersion;
12+
import com.github.dockerjava.utils.TestUtils;
1013
import org.testng.ITestResult;
14+
import org.testng.SkipException;
1115
import org.testng.annotations.AfterMethod;
1216
import org.testng.annotations.AfterTest;
1317
import org.testng.annotations.BeforeMethod;
@@ -43,6 +47,10 @@ public void afterMethod(ITestResult result) {
4347

4448
@Test
4549
public void copyFromContainer() throws Exception {
50+
if (getVersion(dockerClient).isGreaterOrEqual(RemoteApiVersion.VERSION_1_24)) {
51+
throw new SkipException("Doesn't work since 1.24");
52+
}
53+
4654
// TODO extract this into a shared method
4755
CreateContainerResponse container = dockerClient.createContainerCmd("busybox")
4856
.withName("docker-java-itest-copyFromContainer").withCmd("touch", "/copyFromContainer").exec();
Collapse file

‎src/test/java/com/github/dockerjava/netty/exec/CopyFileFromContainerCmdExecTest.java‎

Copy file name to clipboardExpand all lines: src/test/java/com/github/dockerjava/netty/exec/CopyFileFromContainerCmdExecTest.java
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package com.github.dockerjava.netty.exec;
22

3+
import static com.github.dockerjava.utils.TestUtils.getVersion;
34
import static org.hamcrest.MatcherAssert.assertThat;
45
import static org.hamcrest.Matchers.isEmptyOrNullString;
56
import static org.hamcrest.Matchers.not;
67

78
import java.io.InputStream;
89
import java.lang.reflect.Method;
910

11+
import com.github.dockerjava.core.RemoteApiVersion;
1012
import org.testng.ITestResult;
13+
import org.testng.SkipException;
1114
import org.testng.annotations.AfterMethod;
1215
import org.testng.annotations.AfterTest;
1316
import org.testng.annotations.BeforeMethod;
@@ -43,6 +46,10 @@ public void afterMethod(ITestResult result) {
4346

4447
@Test
4548
public void copyFromContainer() throws Exception {
49+
if (getVersion(dockerClient).isGreaterOrEqual(RemoteApiVersion.VERSION_1_24)) {
50+
throw new SkipException("Doesn't work since 1.24");
51+
}
52+
4653
// TODO extract this into a shared method
4754
CreateContainerResponse container = dockerClient.createContainerCmd("busybox")
4855
.withName("docker-java-itest-copyFromContainer").withCmd("touch", "/copyFromContainer").exec();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.