You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/04/20 21:34:54 UTC

[camel-k] 01/03: add TestRunDevModeOutputFlag

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit c47513ed3efba679e5ab76634b299c53fd548b7d
Author: Kuthumi Pepple <ku...@gmail.com>
AuthorDate: Mon Apr 18 09:05:36 2022 +0100

    add TestRunDevModeOutputFlag
---
 pkg/cmd/run_test.go | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/pkg/cmd/run_test.go b/pkg/cmd/run_test.go
index cb31977e4..0959c5a53 100644
--- a/pkg/cmd/run_test.go
+++ b/pkg/cmd/run_test.go
@@ -132,6 +132,16 @@ func TestRunDevFlag(t *testing.T) {
 	assert.Equal(t, true, runCmdOptions.Dev)
 }
 
+func TestRunDevModeOutputFlag(t *testing.T) {
+	runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t)
+	_, err := test.ExecuteCommand(rootCmd, cmdRun, "--dev", "-o", "yaml", integrationSource)
+	assert.Equal(t, true, runCmdOptions.Dev)
+	assert.Equal(t, "yaml", runCmdOptions.OutputFormat)
+	assert.NotNil(t, err)
+	assert.Equal(t, "option '-o' is not compatible with '--dev'",
+		err.Error())
+}
+
 func TestRunEnvFlag(t *testing.T) {
 	runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t)
 	_, err := test.ExecuteCommand(rootCmd, cmdRun,