From e51734ce879c5d4dbb0f929b35d81d048cd48381 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Fri, 4 Aug 2023 11:14:33 +0200 Subject: [PATCH] Add integration test to check flag is not supported --- tests/integration/generic_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/generic_test.go b/tests/integration/generic_test.go index f5f98632c0a..282e3c491e7 100644 --- a/tests/integration/generic_test.go +++ b/tests/integration/generic_test.go @@ -35,10 +35,13 @@ var _ = Describe("odo generic", func() { BeforeEach(func() { output = helper.Cmd("odo", "--help").ShouldPass().Out() }) - It("retuns full help contents including usage, examples, commands, utility commands, component shortcuts, and flags sections", func() { + It("returns full help contents including usage, examples, commands, utility commands, component shortcuts, and flags sections", func() { helper.MatchAllInOutput(output, []string{"Usage:", "Examples:", "Main Commands:", "OpenShift Commands:", "Utility Commands:", "Flags:"}) + helper.DontMatchAllInOutput(output, []string{"--kubeconfig"}) + }) + It("does not support the --kubeconfig flag", func() { + helper.DontMatchAllInOutput(output, []string{"--kubeconfig"}) }) - }) When("running odo without subcommand and flags", func() {