kubernetes/staging/src/k8s.io/kubelet/pkg/cri/streaming/server_test.go

const testAddr

const testContainerID

const testPodSandboxID

func TestGetExec(t *testing.T) {}

func TestValidateExecAttachRequest(t *testing.T) {}

func TestGetAttach(t *testing.T) {}

func TestGetPortForward(t *testing.T) {}

func TestServeExec(t *testing.T) {}

func TestServeAttach(t *testing.T) {}

func TestServePortForward(t *testing.T) {}

// Run the remote command test.
// commandType is either "exec" or "attach".
func runRemoteCommandTest(t *testing.T, commandType string) {}

func startTestServer(t *testing.T) (Server, *httptest.Server) {}

const testInput

const testOutput

const testErr

const testPort

func newFakeRuntime(t *testing.T) *fakeRuntime {}

type fakeRuntime

func (f *fakeRuntime) Exec(_ context.Context, containerID string, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {}

func (f *fakeRuntime) Attach(_ context.Context, containerID string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {}

func (f *fakeRuntime) PortForward(_ context.Context, podSandboxID string, port int32, stream io.ReadWriteCloser) error {}

// Send & receive expected input/output. Must be the inverse of doClientStreams.
// Function will block until the expected i/o is finished.
func doServerStreams(t *testing.T, prefix string, stdin io.Reader, stdout, stderr io.Writer) {}

// Send & receive expected input/output. Must be the inverse of doServerStreams.
// Function will block until the expected i/o is finished.
func doClientStreams(t *testing.T, prefix string, stdin io.Writer, stdout, stderr io.Reader) {}

// Read and verify the expected string from the stream.
func readExpected(t *testing.T, streamName string, r io.Reader, expected string) {}

// Write and verify success of the data over the stream.
func writeExpected(t *testing.T, streamName string, w io.Writer, data string) {}