Skip to content

Commit 9485033

Browse files
authored
Add GitHub Actions (#1268)
* Create ci.yml * Update ci.yml * Use less concrete exception type in PauseCmdIT
1 parent fb11f94 commit 9485033

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Set up JDK 8
12+
uses: actions/setup-java@v1
13+
with:
14+
java-version: 8
15+
- name: Build with Maven
16+
run: mvn verify

docker-java/src/test/java/com/github/dockerjava/cmd/PauseCmdIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.github.dockerjava.cmd;
22

33
import com.github.dockerjava.api.command.CreateContainerResponse;
4-
import com.github.dockerjava.api.exception.InternalServerErrorException;
4+
import com.github.dockerjava.api.exception.DockerException;
55
import com.github.dockerjava.api.exception.NotFoundException;
66
import com.github.dockerjava.utils.ContainerUtils;
77
import org.junit.Test;
@@ -33,7 +33,7 @@ public void pauseNonExistingContainer() {
3333
dockerRule.getClient().pauseContainerCmd("non-existing").exec();
3434
}
3535

36-
@Test(expected = InternalServerErrorException.class)
36+
@Test(expected = DockerException.class)
3737
public void pauseStoppedContainer() {
3838

3939
CreateContainerResponse container = dockerRule.getClient().createContainerCmd("busybox").withCmd("sleep", "9999").exec();
@@ -47,7 +47,7 @@ public void pauseStoppedContainer() {
4747
dockerRule.getClient().pauseContainerCmd(container.getId()).exec();
4848
}
4949

50-
@Test(expected = InternalServerErrorException.class)
50+
@Test(expected = DockerException.class)
5151
public void pausePausedContainer() {
5252

5353
CreateContainerResponse container = dockerRule.getClient().createContainerCmd("busybox").withCmd("sleep", "9999").exec();
@@ -61,7 +61,7 @@ public void pausePausedContainer() {
6161
dockerRule.getClient().pauseContainerCmd(container.getId()).exec();
6262
}
6363

64-
@Test(expected = InternalServerErrorException.class)
64+
@Test(expected = DockerException.class)
6565
public void pauseCreatedContainer() {
6666

6767
CreateContainerResponse container = dockerRule.getClient().createContainerCmd("busybox").withCmd("sleep", "9999").exec();

0 commit comments

Comments
 (0)