Use config in service.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-09-17 06:46:30 +00:00
parent da31647ef8
commit 71b0d0a043
9 changed files with 34 additions and 63 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package server
import (
"github.com/kubernetes-incubator/cri-containerd/cmd/cri-containerd/options"
ostesting "github.com/kubernetes-incubator/cri-containerd/pkg/os/testing"
"github.com/kubernetes-incubator/cri-containerd/pkg/registrar"
servertesting "github.com/kubernetes-incubator/cri-containerd/pkg/server/testing"
@@ -36,9 +37,11 @@ const (
// newTestCRIContainerdService creates a fake criContainerdService for test.
func newTestCRIContainerdService() *criContainerdService {
return &criContainerdService{
config: options.Config{
RootDir: testRootDir,
SandboxImage: testSandboxImage,
},
os: ostesting.NewFakeOS(),
rootDir: testRootDir,
sandboxImage: testSandboxImage,
sandboxStore: sandboxstore.NewStore(),
imageStore: imagestore.NewStore(),
sandboxNameIndex: registrar.NewRegistrar(),