func TestLog(t *testing.T) { … } func testPod() *corev1.Pod { … } func TestValidateLogOptions(t *testing.T) { … } func TestLogComplete(t *testing.T) { … } func TestDefaultConsumeRequest(t *testing.T) { … } func TestNoResourceFoundMessage(t *testing.T) { … } func TestNoPodInNamespaceFoundMessage(t *testing.T) { … } type responseWrapperMock … func (r *responseWrapperMock) DoRaw(context.Context) ([]byte, error) { … } func (r *responseWrapperMock) Stream(context.Context) (io.ReadCloser, error) { … } type logTestMock … func (l *logTestMock) mockConsumeRequest(ctx context.Context, request restclient.ResponseWrapper, out io.Writer) error { … } func (l *logTestMock) mockLogsForObject(restClientGetter genericclioptions.RESTClientGetter, object, options runtime.Object, timeout time.Duration, allContainers bool) (map[corev1.ObjectReference]restclient.ResponseWrapper, error) { … }