Remove kubeconfig flag (#7017)

* Remove kubeconfig flag

* Do not check file exists from KUBECONFIG, as KUBECONFIG can be a list of files and this is done by clientcmd library

* Fix odo --help

* Add integration test to check flag is not supported
This commit is contained in:
Philippe Martin
2023-08-04 11:52:19 +02:00
committed by GitHub
parent 1c6767ee37
commit 7c976f1bf1
3 changed files with 11 additions and 15 deletions

View File

@@ -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() {