| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 995d81f commit 6d9dec3
236 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,6 +22,9 @@ env: | |||
| 22 | 22 | - COVERITY_SCAN_NOTIFICATION_EMAIL="kanstantsin.sha@gmail.com" | |
| 23 | 23 | ||
| 24 | 24 | matrix: | |
| 25 | + # - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="17.09.0~ce-0~ubuntu-trusty" | ||
| 26 | + # - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="17.09.0~ce-0~ubuntu-trusty" | ||
| 27 | + # - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="17.06.2~ce-0~ubuntu-trusty" DEPLOY=true COVERITY=true | ||
| 25 | 28 | - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="17.05.0~ce-0~ubuntu-trusty" DEPLOY=true COVERITY=true | |
| 26 | 29 | - repo="main" DOCKER_HOST="tcp://127.0.0.1:2377" DOCKER_VERSION="17.05.0~ce-0~ubuntu-trusty" SWARM_VERSION="1.2.6" | |
| 27 | 30 | - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="17.05.0~ce-0~ubuntu-trusty" | |
@@ -30,10 +33,10 @@ env: | |||
| 30 | 33 | - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="1.13.1-0~ubuntu-trusty" | |
| 31 | 34 | - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="1.12.6-0~ubuntu-trusty" | |
| 32 | 35 | - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="1.12.6-0~ubuntu-trusty" | |
| 33 | - - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="1.11.2-0~trusty" | ||
| 34 | - - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="1.11.2-0~trusty" | ||
| 35 | - - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="1.10.3-0~trusty" | ||
| 36 | - - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="1.10.3-0~trusty" | ||
| 36 | + # - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="1.11.2-0~trusty" | ||
| 37 | + # - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="1.11.2-0~trusty" | ||
| 38 | + # - repo="main" DOCKER_HOST="tcp://127.0.0.1:2375" DOCKER_VERSION="1.10.3-0~trusty" | ||
| 39 | + # - repo="main" DOCKER_HOST="unix:///var/run/docker.sock" DOCKER_VERSION="1.10.3-0~trusty" | ||
| 37 | 40 | # - repo="testing" DOCKER_HOST="tcp://127.0.0.1:2375" | |
| 38 | 41 | # - repo="testing" DOCKER_HOST="unix:///var/run/docker.sock" | |
| 39 | 42 | # - repo="experimental" DOCKER_HOST="tcp://127.0.0.1:2375" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,8 +45,9 @@ sudo -E stop docker | |||
| 45 | 45 | # sudo apt-get -f install | |
| 46 | 46 | # sudo dpkg -i "$(ls *${DOCKER_VERSION}*)" | |
| 47 | 47 | #popd | |
| 48 | - #rm -f "src/test/resources/logback.xml" | ||
| 49 | - mv "src/test/resources/travis-logback.xml" "src/test/resources/logback.xml" | ||
| 48 | + rm -f "src/test/resources/logback.xml" | ||
| 49 | + #rm -f "src/test/resources/travis-logback.xml" | ||
| 50 | + mv "src/test/resources/travis-logback.xml" "src/test/resources/logback-test.xml" | ||
| 50 | 51 | ||
| 51 | 52 | # https://github.com/docker/docker/issues/18113 | |
| 52 | 53 | sudo rm /var/lib/docker/network/files/local-kv.db | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,7 +57,7 @@ | |||
| 57 | 57 | <jdk.source>1.7</jdk.source> | |
| 58 | 58 | <jdk.target>1.7</jdk.target> | |
| 59 | 59 | ||
| 60 | - <jersey.version>2.23.1</jersey.version> | ||
| 60 | + <jersey.version>2.26</jersey.version> | ||
| 61 | 61 | <jackson-jaxrs.version>2.6.4</jackson-jaxrs.version> | |
| 62 | 62 | <httpclient.version>4.5</httpclient.version><!-- 4.5.1-4.5.2 broken --> | |
| 63 | 63 | <commons-compress.version>1.12</commons-compress.version> | |
@@ -71,8 +71,7 @@ | |||
| 71 | 71 | <guava.version>19.0</guava.version> | |
| 72 | 72 | ||
| 73 | 73 | <!-- test dependencies --> | |
| 74 | - <logback.version>1.1.7</logback.version> | ||
| 75 | - <testng.version>6.9.10</testng.version> | ||
| 74 | + <logback.version>1.2.3</logback.version> | ||
| 76 | 75 | <netty.version>4.1.14.Final</netty.version> | |
| 77 | 76 | <hamcrest.library.version>1.3</hamcrest.library.version> | |
| 78 | 77 | <hamcrest.jpa-matchers>1.8</hamcrest.jpa-matchers> | |
@@ -83,8 +82,8 @@ | |||
| 83 | 82 | <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version> | |
| 84 | 83 | <maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version> | |
| 85 | 84 | <maven-release-plugin.version>2.5.3</maven-release-plugin.version> | |
| 86 | - <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> | ||
| 87 | - <maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version> | ||
| 85 | + <maven-surefire-plugin.version>2.20</maven-surefire-plugin.version> | ||
| 86 | + <maven-failsafe-plugin.version>2.20</maven-failsafe-plugin.version> | ||
| 88 | 87 | <maven-antrun-plugin.version>1.8</maven-antrun-plugin.version> | |
| 89 | 88 | <maven-bundlor-plugin.version>1.1.2.RELEASE</maven-bundlor-plugin.version> | |
| 90 | 89 | <maven-build-helper-plugin.version>3.0.0</maven-build-helper-plugin.version> | |
@@ -122,6 +121,11 @@ | |||
| 122 | 121 | <artifactId>jersey-client</artifactId> | |
| 123 | 122 | <version>${jersey.version}</version> | |
| 124 | 123 | </dependency> | |
| 124 | + <dependency> | ||
| 125 | + <groupId>org.glassfish.jersey.inject</groupId> | ||
| 126 | + <artifactId>jersey-hk2</artifactId> | ||
| 127 | + <version>${jersey.version}</version> | ||
| 128 | + </dependency> | ||
| 125 | 129 | <dependency> | |
| 126 | 130 | <groupId>com.kohlschutter.junixsocket</groupId> | |
| 127 | 131 | <artifactId>junixsocket-common</artifactId> | |
@@ -189,13 +193,6 @@ | |||
| 189 | 193 | <scope>test</scope> | |
| 190 | 194 | </dependency> | |
| 191 | 195 | ||
| 192 | - <dependency> | ||
| 193 | - <groupId>org.testng</groupId> | ||
| 194 | - <artifactId>testng</artifactId> | ||
| 195 | - <version>${testng.version}</version> | ||
| 196 | - <scope>test</scope> | ||
| 197 | - </dependency> | ||
| 198 | - | ||
| 199 | 196 | <dependency> | |
| 200 | 197 | <groupId>org.hamcrest</groupId> | |
| 201 | 198 | <artifactId>hamcrest-library</artifactId> | |
@@ -430,7 +427,7 @@ | |||
| 430 | 427 | <version>${maven-surefire-plugin.version}</version> | |
| 431 | 428 | <configuration> | |
| 432 | 429 | <rerunFailingTestsCount>3</rerunFailingTestsCount> | |
| 433 | - <excludedGroups>integration,integration-auth,swarm-integration</excludedGroups> | ||
| 430 | + <excludedGroups>com.github.dockerjava.junit.category.Integration</excludedGroups> | ||
| 434 | 431 | </configuration> | |
| 435 | 432 | </plugin> | |
| 436 | 433 | ||
@@ -444,19 +441,17 @@ | |||
| 444 | 441 | <goal>integration-test</goal> | |
| 445 | 442 | <goal>verify</goal> | |
| 446 | 443 | </goals> | |
| 447 | - <configuration> | ||
| 448 | - <rerunFailingTestsCount>3</rerunFailingTestsCount> | ||
| 449 | - <useUnlimitedThreads>true</useUnlimitedThreads> | ||
| 450 | - <perCoreThreadCount>true</perCoreThreadCount> | ||
| 451 | - <threadCount>1</threadCount> | ||
| 452 | - <groups>integration</groups> | ||
| 453 | - <excludedGroups>integration-auth,swarm-integration</excludedGroups> | ||
| 454 | - <includes> | ||
| 455 | - <include>**/*Test.java</include> | ||
| 456 | - </includes> | ||
| 457 | - </configuration> | ||
| 458 | 444 | </execution> | |
| 459 | 445 | </executions> | |
| 446 | + <configuration> | ||
| 447 | + <rerunFailingTestsCount>3</rerunFailingTestsCount> | ||
| 448 | + <!--<useUnlimitedThreads>true</useUnlimitedThreads>--> | ||
| 449 | + <perCoreThreadCount>true</perCoreThreadCount> | ||
| 450 | + <threadCount>1</threadCount> | ||
| 451 | + <parallel>classes</parallel> | ||
| 452 | + <groups>com.github.dockerjava.junit.category.Integration</groups> | ||
| 453 | + <excludedGroups>com.github.dockerjava.junit.category.AuthIntegration,com.github.dockerjava.junit.category.SwarmModeIntegration</excludedGroups> | ||
| 454 | + </configuration> | ||
| 460 | 455 | </plugin> | |
| 461 | 456 | <plugin> | |
| 462 | 457 | <groupId>org.apache.maven.plugins</groupId> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -77,6 +77,10 @@ public class RemoteApiVersion implements Serializable { | |||
| 77 | 77 | */ | |
| 78 | 78 | public static final RemoteApiVersion VERSION_1_25 = RemoteApiVersion.create(1, 25); | |
| 79 | 79 | ||
| 80 | + public static final RemoteApiVersion VERSION_1_26 = RemoteApiVersion.create(1, 26); | ||
| 81 | + public static final RemoteApiVersion VERSION_1_27 = RemoteApiVersion.create(1, 27); | ||
| 82 | + public static final RemoteApiVersion VERSION_1_29 = RemoteApiVersion.create(1, 29); | ||
| 83 | + | ||
| 80 | 84 | ||
| 81 | 85 | /** | |
| 82 | 86 | * Unknown, docker doesn't reflect reality. I.e. we implemented method, but for javadoc it not clear when it was added. | |
@@ -88,6 +92,11 @@ public boolean isGreaterOrEqual(final RemoteApiVersion other) { | |||
| 88 | 92 | return false; | |
| 89 | 93 | } | |
| 90 | 94 | ||
| 95 | + @Override | ||
| 96 | + public boolean isGreater(RemoteApiVersion other) { | ||
| 97 | + return false; | ||
| 98 | + } | ||
| 99 | + | ||
| 91 | 100 | @Override | |
| 92 | 101 | public String toString() { | |
| 93 | 102 | return MoreObjects.toStringHelper(this).addValue("UNKNOWN_VERSION").toString(); | |
@@ -146,6 +155,11 @@ public boolean isGreaterOrEqual(final RemoteApiVersion other) { | |||
| 146 | 155 | return false; | |
| 147 | 156 | } | |
| 148 | 157 | ||
| 158 | + public boolean isGreater(final RemoteApiVersion other) { | ||
| 159 | + return major > other.major || (major == other.major && minor > other.minor); | ||
| 160 | + | ||
| 161 | + } | ||
| 162 | + | ||
| 149 | 163 | /** | |
| 150 | 164 | * @return String representation of version. i.e. "1.22" | |
| 151 | 165 | */ | |
@@ -179,4 +193,5 @@ public String toString() { | |||
| 179 | 193 | public String asWebPathPart() { | |
| 180 | 194 | return "v" + major + "." + minor; | |
| 181 | 195 | } | |
| 196 | + | ||
| 182 | 197 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,24 +8,10 @@ | |||
| 8 | 8 | import com.github.dockerjava.api.model.Frame; | |
| 9 | 9 | ||
| 10 | 10 | /** | |
| 11 | - * Attach to container | ||
| 12 | - * | ||
| 13 | - * @param logs | ||
| 14 | - * - true or false, includes logs. Defaults to false. | ||
| 15 | - * | ||
| 16 | - * @param followStream | ||
| 17 | - * - true or false, return stream. Defaults to false. | ||
| 18 | - * @param stdout | ||
| 19 | - * - true or false, includes stdout log. Defaults to false. | ||
| 20 | - * @param stderr | ||
| 21 | - * - true or false, includes stderr log. Defaults to false. | ||
| 22 | - * @param stdin | ||
| 23 | - * - null or {@link InputStream}, pass stream to stdin of the container. | ||
| 24 | - * @param timestamps | ||
| 25 | - * - true or false, if true, print timestamps for every log line. Defaults to false. | ||
| 11 | + * Attach to container. | ||
| 26 | 12 | */ | |
| 27 | - public class AttachContainerCmdImpl extends AbstrAsyncDockerCmd<AttachContainerCmd, Frame> implements | ||
| 28 | - AttachContainerCmd { | ||
| 13 | + public class AttachContainerCmdImpl extends AbstrAsyncDockerCmd<AttachContainerCmd, Frame> | ||
| 14 | + implements AttachContainerCmd { | ||
| 29 | 15 | ||
| 30 | 16 | private String containerId; | |
| 31 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,9 +7,9 @@ | |||
| 7 | 7 | import com.github.dockerjava.api.model.ResponseItem; | |
| 8 | 8 | import com.google.common.reflect.ClassPath.ClassInfo; | |
| 9 | 9 | import org.apache.commons.lang.reflect.FieldUtils; | |
| 10 | + import org.junit.Test; | ||
| 10 | 11 | import org.slf4j.Logger; | |
| 11 | 12 | import org.slf4j.LoggerFactory; | |
| 12 | - import org.testng.annotations.Test; | ||
| 13 | 13 | ||
| 14 | 14 | import java.io.IOException; | |
| 15 | 15 | import java.io.Serializable; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,23 +17,22 @@ | |||
| 17 | 17 | ||
| 18 | 18 | import com.fasterxml.jackson.databind.JavaType; | |
| 19 | 19 | import com.fasterxml.jackson.databind.ObjectMapper; | |
| 20 | - import com.github.dockerjava.api.model.Event; | ||
| 21 | 20 | import com.github.dockerjava.core.RemoteApiVersion; | |
| 22 | - import static com.github.dockerjava.test.serdes.JSONSamples.testRoundTrip; | ||
| 23 | - import java.io.IOException; | ||
| 21 | + import org.junit.Test; | ||
| 24 | 22 | ||
| 25 | - import org.testng.annotations.Test; | ||
| 23 | + import java.io.IOException; | ||
| 26 | 24 | ||
| 25 | + import static com.github.dockerjava.test.serdes.JSONSamples.testRoundTrip; | ||
| 27 | 26 | import static com.github.dockerjava.test.serdes.JSONTestHelper.testRoundTrip; | |
| 28 | 27 | import static org.hamcrest.MatcherAssert.assertThat; | |
| 29 | 28 | import static org.hamcrest.Matchers.containsString; | |
| 30 | 29 | import static org.hamcrest.Matchers.is; | |
| 31 | 30 | import static org.hamcrest.Matchers.isEmptyString; | |
| 32 | 31 | import static org.hamcrest.Matchers.nullValue; | |
| 33 | 32 | import static org.hamcrest.core.IsNot.not; | |
| 34 | - import static org.testng.Assert.assertEquals; | ||
| 35 | - import static org.testng.Assert.assertFalse; | ||
| 36 | - import static org.testng.Assert.assertTrue; | ||
| 33 | + import static org.junit.Assert.assertEquals; | ||
| 34 | + import static org.junit.Assert.assertFalse; | ||
| 35 | + import static org.junit.Assert.assertTrue; | ||
| 37 | 36 | ||
| 38 | 37 | /** | |
| 39 | 38 | * Tests for {@link InspectContainerResponse}. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | import com.fasterxml.jackson.databind.JavaType; | |
| 4 | 4 | import com.fasterxml.jackson.databind.ObjectMapper; | |
| 5 | 5 | import com.github.dockerjava.core.RemoteApiVersion; | |
| 6 | - import org.testng.annotations.Test; | ||
| 6 | + import org.junit.Test; | ||
| 7 | 7 | ||
| 8 | 8 | import static com.github.dockerjava.test.serdes.JSONSamples.testRoundTrip; | |
| 9 | 9 | import static org.hamcrest.MatcherAssert.assertThat; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | import com.fasterxml.jackson.databind.JavaType; | |
| 4 | 4 | import com.fasterxml.jackson.databind.ObjectMapper; | |
| 5 | 5 | import com.github.dockerjava.api.model.ContainerConfig; | |
| 6 | - import org.testng.annotations.Test; | ||
| 6 | + import org.junit.Test; | ||
| 7 | 7 | ||
| 8 | 8 | import java.io.IOException; | |
| 9 | 9 | import java.util.Collections; | |
@@ -191,7 +191,7 @@ public void serder1_22_inspect_doc() throws IOException { | |||
| 191 | 191 | } | |
| 192 | 192 | ||
| 193 | 193 | @Test | |
| 194 | - private void testOverlayNetworkRootDir() throws IOException { | ||
| 194 | + public void testOverlayNetworkRootDir() throws IOException { | ||
| 195 | 195 | final ObjectMapper mapper = new ObjectMapper(); | |
| 196 | 196 | final JavaType type = mapper.getTypeFactory().constructType(InspectImageResponse.class); | |
| 197 | 197 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,18 @@ | |||
| 1 | 1 | package com.github.dockerjava.api.model; | |
| 2 | 2 | ||
| 3 | + import org.junit.Rule; | ||
| 4 | + import org.junit.Test; | ||
| 5 | + import org.junit.rules.ExpectedException; | ||
| 6 | + | ||
| 3 | 7 | import static com.github.dockerjava.api.model.AccessMode.rw; | |
| 4 | - import static org.testng.Assert.assertEquals; | ||
| 8 | + import static org.junit.Assert.assertEquals; | ||
| 5 | 9 | ||
| 6 | - import org.testng.annotations.Test; | ||
| 7 | 10 | ||
| 8 | 11 | public class AccessModeTest { | |
| 9 | 12 | ||
| 13 | + @Rule | ||
| 14 | + public ExpectedException expectedEx = ExpectedException.none(); | ||
| 15 | + | ||
| 10 | 16 | @Test | |
| 11 | 17 | public void defaultAccessMode() { | |
| 12 | 18 | assertEquals(AccessMode.DEFAULT, rw); | |
@@ -22,8 +28,11 @@ public void fromString() { | |||
| 22 | 28 | assertEquals(AccessMode.valueOf("rw"), rw); | |
| 23 | 29 | } | |
| 24 | 30 | ||
| 25 | - @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "No enum const.*") | ||
| 31 | + @Test | ||
| 26 | 32 | public void fromIllegalString() { | |
| 33 | + expectedEx.expect(IllegalArgumentException.class); | ||
| 34 | + expectedEx.expectMessage("No enum const"); | ||
| 35 | + | ||
| 27 | 36 | AccessMode.valueOf("xx"); | |
| 28 | 37 | } | |
| 29 | 38 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments