Skip to content

Commit ab1a069

Browse files
committed
Fix tests
1 parent 1d13e5b commit ab1a069

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/test/java/com/github/dockerjava/api/command/InspectContainerResponseTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void roundTrip_full() throws IOException {
6868
public void roundTrip_full_healthcheck() throws IOException {
6969

7070
final ObjectMapper mapper = new ObjectMapper();
71-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(InspectContainerResponse.class);
71+
final JavaType type = mapper.getTypeFactory().constructType(InspectContainerResponse.class);
7272

7373
final InspectContainerResponse response = testRoundTrip(RemoteApiVersion.VERSION_1_24,
7474
"/containers/inspect/1.json",
@@ -139,7 +139,7 @@ public void roundTrip_empty() throws IOException {
139139
public void inspect_windows_container() throws IOException {
140140

141141
final ObjectMapper mapper = new ObjectMapper();
142-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(InspectContainerResponse.class);
142+
final JavaType type = mapper.getTypeFactory().constructType(InspectContainerResponse.class);
143143

144144
final InspectContainerResponse response = testRoundTrip(RemoteApiVersion.VERSION_1_38,
145145
"/containers/inspect/lcow.json",

src/test/java/com/github/dockerjava/api/command/InspectExecResponseTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class InspectExecResponseTest {
2121
@Test
2222
public void test_1_22_SerDer1() throws Exception {
2323
final ObjectMapper mapper = new ObjectMapper();
24-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(InspectExecResponse.class);
24+
final JavaType type = mapper.getTypeFactory().constructType(InspectExecResponse.class);
2525

2626
final InspectExecResponse execResponse = testRoundTrip(RemoteApiVersion.VERSION_1_22,
2727
"/exec/ID/1.json",

src/test/java/com/github/dockerjava/api/model/AuthConfigTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void defaultServerAddress() throws Exception {
2525
@Test
2626
public void serderDocs1() throws IOException {
2727
final ObjectMapper mapper = new ObjectMapper();
28-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(AuthConfig.class);
28+
final JavaType type = mapper.getTypeFactory().constructType(AuthConfig.class);
2929

3030
final AuthConfig authConfig = testRoundTrip(RemoteApiVersion.VERSION_1_22,
3131
"/other/AuthConfig/docs1.json",
@@ -47,7 +47,7 @@ public void serderDocs1() throws IOException {
4747
@Test
4848
public void serderDocs2() throws IOException {
4949
final ObjectMapper mapper = new ObjectMapper();
50-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(AuthConfig.class);
50+
final JavaType type = mapper.getTypeFactory().constructType(AuthConfig.class);
5151

5252
final AuthConfig authConfig = testRoundTrip(RemoteApiVersion.VERSION_1_22,
5353
"/other/AuthConfig/docs2.json",
@@ -66,7 +66,7 @@ public void serderDocs2() throws IOException {
6666
@Test
6767
public void compatibleWithIdentitytoken() throws IOException {
6868
final ObjectMapper mapper = new ObjectMapper();
69-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(AuthConfig.class);
69+
final JavaType type = mapper.getTypeFactory().constructType(AuthConfig.class);
7070
final AuthConfig authConfig = testRoundTrip(RemoteApiVersion.VERSION_1_23,
7171
"/other/AuthConfig/docs1.json",
7272
type
@@ -83,7 +83,7 @@ public void compatibleWithIdentitytoken() throws IOException {
8383
@Test
8484
public void shouldNotFailWithStackOrchestratorInConfig() throws IOException {
8585
final ObjectMapper mapper = new ObjectMapper();
86-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(AuthConfig.class);
86+
final JavaType type = mapper.getTypeFactory().constructType(AuthConfig.class);
8787
final AuthConfig authConfig = testRoundTrip(RemoteApiVersion.VERSION_1_25,
8888
"/other/AuthConfig/orchestrators.json",
8989
type

src/test/java/com/github/dockerjava/api/model/EventsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class EventsTest {
2424
@Test
2525
public void serderDocs1() throws IOException {
2626
final ObjectMapper mapper = new ObjectMapper();
27-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(Event.class);
27+
final JavaType type = mapper.getTypeFactory().constructType(Event.class);
2828

2929
final Event event = testRoundTrip(RemoteApiVersion.VERSION_1_24,
3030
"/events/docs1.json",

src/test/java/com/github/dockerjava/api/model/StatisticsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class StatisticsTest {
2323
@Test
2424
public void serderJson1() throws IOException {
2525
final ObjectMapper mapper = new ObjectMapper();
26-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(Statistics.class);
26+
final JavaType type = mapper.getTypeFactory().constructType(Statistics.class);
2727

2828
final Statistics statistics = testRoundTrip(RemoteApiVersion.VERSION_1_27,
2929
"containers/container/stats/stats1.json",

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void updateContainer() throws DockerException, IOException {
8484
@Test
8585
public void serDerDocs1() throws IOException {
8686
final ObjectMapper mapper = new ObjectMapper();
87-
final JavaType type = mapper.getTypeFactory().uncheckedSimpleType(UpdateContainerCmdImpl.class);
87+
final JavaType type = mapper.getTypeFactory().constructType(UpdateContainerCmdImpl.class);
8888

8989
final UpdateContainerCmdImpl upd = testRoundTrip(VERSION_1_22,
9090
"/containers/container/update/docs.json",

0 commit comments

Comments
 (0)