From 1a9a54e45847b00b81e57c7005b5887c8ea68673 Mon Sep 17 00:00:00 2001 From: Predrag Rogic Date: Sat, 7 Nov 2020 23:07:35 +0000 Subject: [PATCH 1/2] Update generate-docs test to include --help flag --- cmd/minikube/cmd/generate-docs_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/minikube/cmd/generate-docs_test.go b/cmd/minikube/cmd/generate-docs_test.go index 3a4e8b6ba607..88c261940a71 100644 --- a/cmd/minikube/cmd/generate-docs_test.go +++ b/cmd/minikube/cmd/generate-docs_test.go @@ -23,10 +23,12 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/spf13/pflag" "k8s.io/minikube/pkg/generate" ) func TestGenerateDocs(t *testing.T) { + pflag.BoolP("help", "h", false, "") dir := "../../../site/content/en/docs/commands/" for _, sc := range RootCmd.Commands() { From 432762f9e3b2105a818e6a51eb62983b4de5dcce Mon Sep 17 00:00:00 2001 From: Predrag Rogic Date: Sat, 7 Nov 2020 23:40:41 +0000 Subject: [PATCH 2/2] Update generate-docs test to include --help flag --- cmd/minikube/cmd/generate-docs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/generate-docs_test.go b/cmd/minikube/cmd/generate-docs_test.go index 88c261940a71..b8dab4e720c2 100644 --- a/cmd/minikube/cmd/generate-docs_test.go +++ b/cmd/minikube/cmd/generate-docs_test.go @@ -28,7 +28,7 @@ import ( ) func TestGenerateDocs(t *testing.T) { - pflag.BoolP("help", "h", false, "") + pflag.BoolP("help", "h", false, "") // avoid 'Docs are not updated. Please run `make generate-docs` to update commands documentation' error dir := "../../../site/content/en/docs/commands/" for _, sc := range RootCmd.Commands() {