Add container attach support.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -17,24 +17,14 @@ limitations under the License.
|
||||
package server
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
ostesting "github.com/kubernetes-incubator/cri-containerd/pkg/os/testing"
|
||||
"github.com/kubernetes-incubator/cri-containerd/pkg/registrar"
|
||||
agentstesting "github.com/kubernetes-incubator/cri-containerd/pkg/server/agents/testing"
|
||||
servertesting "github.com/kubernetes-incubator/cri-containerd/pkg/server/testing"
|
||||
containerstore "github.com/kubernetes-incubator/cri-containerd/pkg/store/container"
|
||||
imagestore "github.com/kubernetes-incubator/cri-containerd/pkg/store/image"
|
||||
sandboxstore "github.com/kubernetes-incubator/cri-containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
type nopReadWriteCloser struct{}
|
||||
|
||||
// Return error directly to avoid read/write.
|
||||
func (nopReadWriteCloser) Read(p []byte) (n int, err error) { return 0, io.EOF }
|
||||
func (nopReadWriteCloser) Write(p []byte) (n int, err error) { return 0, io.ErrShortWrite }
|
||||
func (nopReadWriteCloser) Close() error { return nil }
|
||||
|
||||
const (
|
||||
testRootDir = "/test/rootfs"
|
||||
// Use an image id as test sandbox image to avoid image name resolve.
|
||||
@@ -55,6 +45,5 @@ func newTestCRIContainerdService() *criContainerdService {
|
||||
containerStore: containerstore.NewStore(),
|
||||
containerNameIndex: registrar.NewRegistrar(),
|
||||
netPlugin: servertesting.NewFakeCNIPlugin(),
|
||||
agentFactory: agentstesting.NewFakeAgentFactory(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user