From e64b6293162513466fb1ee419dca1ebe3cd33dbc Mon Sep 17 00:00:00 2001 From: Cole Snodgrass Date: Wed, 15 May 2024 13:44:25 -0700 Subject: [PATCH] update mock k8s client to have defaults --- internal/cmd/local/local/cmd_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/cmd/local/local/cmd_test.go b/internal/cmd/local/local/cmd_test.go index e05b7b5..9505860 100644 --- a/internal/cmd/local/local/cmd_test.go +++ b/internal/cmd/local/local/cmd_test.go @@ -236,10 +236,16 @@ func (m *mockK8sClient) ServerVersionGet() (string, error) { } func (m *mockK8sClient) EventsWatch(ctx context.Context, namespace string) (watch.Interface, error) { + if m.eventsWatch == nil { + return watch.NewFake(), nil + } return m.eventsWatch(ctx, namespace) } func (m *mockK8sClient) LogsGet(ctx context.Context, namespace string, name string) (string, error) { + if m.logsGet == nil { + return "LogsGet called", nil + } return m.logsGet(ctx, namespace, name) }