Finish snapshot support.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-06-15 05:06:31 +00:00
parent 484a326717
commit bad279e0f6
14 changed files with 231 additions and 81 deletions

View File

@@ -268,7 +268,7 @@ options timeout:1
func TestRunPodSandbox(t *testing.T) {
config, imageConfig, _ := getRunPodSandboxTestData() // TODO: declare and test specCheck see below
c := newTestCRIContainerdService()
fakeSnapshotClient := c.snapshotService.(*servertesting.FakeSnapshotClient)
fakeSnapshotClient := WithFakeSnapshotClient(c)
fakeExecutionClient := c.containerService.(*servertesting.FakeExecutionClient)
fakeCNIPlugin := c.netPlugin.(*servertesting.FakeCNIPlugin)
fakeOS := c.os.(*ostesting.FakeOS)
@@ -292,7 +292,7 @@ func TestRunPodSandbox(t *testing.T) {
}
// Insert sandbox image metadata.
assert.NoError(t, c.imageMetadataStore.Create(imageMetadata))
expectSnapshotClientCalls := []string{"prepare"}
expectSnapshotClientCalls := []string{"view"}
expectExecutionClientCalls := []string{"create", "start"}
res, err := c.RunPodSandbox(context.Background(), &runtime.RunPodSandboxRequest{Config: config})