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) { … }
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 { … }
func doServerStreams(t *testing.T, prefix string, stdin io.Reader, stdout, stderr io.Writer) { … }
func doClientStreams(t *testing.T, prefix string, stdin io.Writer, stdout, stderr io.Reader) { … }
func readExpected(t *testing.T, streamName string, r io.Reader, expected string) { … }
func writeExpected(t *testing.T, streamName string, w io.Writer, data string) { … }