Use wait instead of TaskExit.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -112,7 +112,7 @@ func TestContainerStore(t *testing.T) {
|
||||
ExitCode: 3,
|
||||
Reason: "TestReason-4a333",
|
||||
Message: "TestMessage-4a333",
|
||||
Removing: true,
|
||||
Starting: true,
|
||||
},
|
||||
"4abcd": {
|
||||
Pid: 4,
|
||||
|
||||
@@ -88,6 +88,10 @@ type Status struct {
|
||||
// Human-readable message indicating details about why container is in its
|
||||
// current state.
|
||||
Message string
|
||||
// Starting indicates that the container is in starting state.
|
||||
// This field doesn't need to be checkpointed.
|
||||
// TODO(now): Add unit test.
|
||||
Starting bool `json:"-"`
|
||||
// Removing indicates that the container is in removing state.
|
||||
// This field doesn't need to be checkpointed.
|
||||
Removing bool `json:"-"`
|
||||
|
||||
@@ -75,6 +75,7 @@ func TestStatusEncodeDecode(t *testing.T) {
|
||||
Reason: "test-reason",
|
||||
Message: "test-message",
|
||||
Removing: true,
|
||||
Starting: true,
|
||||
}
|
||||
assert := assertlib.New(t)
|
||||
data, err := s.encode()
|
||||
@@ -82,6 +83,7 @@ func TestStatusEncodeDecode(t *testing.T) {
|
||||
newS := &Status{}
|
||||
assert.NoError(newS.decode(data))
|
||||
s.Removing = false // Removing should not be encoded.
|
||||
s.Starting = false // Starting should not be encoded.
|
||||
assert.Equal(s, newS)
|
||||
|
||||
unsupported, err := json.Marshal(&versionedStatus{
|
||||
|
||||
Reference in New Issue
Block a user