This repository has been archived by the owner on Mar 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make UpdateStatus.completedAt nullable
Add unit test. Fixes #832
- Loading branch information
Showing
4 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/test/java/com/spotify/docker/client/messages/swarm/ServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.spotify.docker.client.messages.swarm; | ||
|
||
import static com.spotify.docker.FixtureUtil.fixture; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.spotify.docker.client.ObjectMapperProvider; | ||
|
||
import org.junit.Test; | ||
|
||
public class ServiceTest { | ||
|
||
private final ObjectMapper objectMapper = ObjectMapperProvider.objectMapper(); | ||
|
||
@Test | ||
public void test1_30() throws Exception { | ||
objectMapper.readValue(fixture("fixtures/1.30/service.json"), Service.class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"ID": "9mnpnzenvg8p8tdbtq4wvbkcz", | ||
"Version": { | ||
"Index": 19 | ||
}, | ||
"CreatedAt": "2016-06-07T21:05:51.880065305Z", | ||
"UpdatedAt": "2016-06-07T21:07:29.962229872Z", | ||
"Spec": { | ||
"Name": "hopeful_cori", | ||
"TaskTemplate": { | ||
"ContainerSpec": { | ||
"Image": "redis" | ||
}, | ||
"Resources": { | ||
"Limits": {}, | ||
"Reservations": {} | ||
}, | ||
"RestartPolicy": { | ||
"Condition": "any", | ||
"MaxAttempts": 0 | ||
}, | ||
"Placement": {}, | ||
"ForceUpdate": 0 | ||
}, | ||
"Mode": { | ||
"Replicated": { | ||
"Replicas": 1 | ||
} | ||
}, | ||
"UpdateConfig": { | ||
"Parallelism": 1, | ||
"Delay": 1000000000, | ||
"FailureAction": "pause", | ||
"Monitor": 15000000000, | ||
"MaxFailureRatio": 0.15 | ||
}, | ||
"RollbackConfig": { | ||
"Parallelism": 1, | ||
"Delay": 1000000000, | ||
"FailureAction": "pause", | ||
"Monitor": 15000000000, | ||
"MaxFailureRatio": 0.15 | ||
}, | ||
"EndpointSpec": { | ||
"Mode": "vip", | ||
"Ports": [ | ||
{ | ||
"Protocol": "tcp", | ||
"TargetPort": 6379, | ||
"PublishedPort": 30001 | ||
} | ||
] | ||
} | ||
}, | ||
"Endpoint": { | ||
"Spec": { | ||
"Mode": "vip", | ||
"Ports": [ | ||
{ | ||
"Protocol": "tcp", | ||
"TargetPort": 6379, | ||
"PublishedPort": 30001 | ||
} | ||
] | ||
}, | ||
"Ports": [ | ||
{ | ||
"Protocol": "tcp", | ||
"TargetPort": 6379, | ||
"PublishedPort": 30001 | ||
} | ||
], | ||
"VirtualIPs": [ | ||
{ | ||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1", | ||
"Addr": "10.255.0.2/16" | ||
}, | ||
{ | ||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1", | ||
"Addr": "10.255.0.3/16" | ||
} | ||
] | ||
} | ||
} |