Merge pull request #179 from Random-Liu/checkpoint-container-status
Checkpoint container status onto disk.
This commit is contained in:
@@ -122,7 +122,10 @@ func TestToCRIContainerStatus(t *testing.T) {
|
||||
status.ExitCode = test.exitCode
|
||||
status.Reason = test.reason
|
||||
status.Message = test.message
|
||||
container, err := containerstore.NewContainer(*metadata, *status)
|
||||
container, err := containerstore.NewContainer(
|
||||
*metadata,
|
||||
containerstore.WithFakeStatus(*status),
|
||||
)
|
||||
assert.NoError(t, err)
|
||||
// Set expectation based on test case.
|
||||
expected.State = test.expectedState
|
||||
@@ -172,7 +175,10 @@ func TestContainerStatus(t *testing.T) {
|
||||
// Update status with test case.
|
||||
status.FinishedAt = test.finishedAt
|
||||
status.Reason = test.reason
|
||||
container, err := containerstore.NewContainer(*metadata, *status)
|
||||
container, err := containerstore.NewContainer(
|
||||
*metadata,
|
||||
containerstore.WithFakeStatus(*status),
|
||||
)
|
||||
assert.NoError(t, err)
|
||||
if test.exist {
|
||||
assert.NoError(t, c.containerStore.Add(container))
|
||||
|
Reference in New Issue
Block a user