Checkpoint container status onto disk.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -116,7 +116,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
|
||||
@@ -157,7 +160,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