From bb73a91641f553158dd8b34b387d696acee14a45 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 29 Jan 2021 15:33:17 +0100 Subject: [PATCH] feat(cmd): compress-binary no longer needed With #1946 we are no longer needing a special `compress-binary` flag --- pkg/cmd/run.go | 2 -- pkg/cmd/run_test.go | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go index 8ac482e5ce..874c443ed3 100644 --- a/pkg/cmd/run.go +++ b/pkg/cmd/run.go @@ -88,7 +88,6 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) (*cobra.Command, *runCmdOptions) cmd.Flags().StringArray("logging-level", nil, "Configure the logging level. e.g. \"--logging-level org.apache.camel=DEBUG\"") cmd.Flags().StringP("output", "o", "", "Output format. One of: json|yaml") cmd.Flags().Bool("compression", false, "Enable storage of sources and resources as a compressed binary blobs") - cmd.Flags().Bool("compress-binary", true, "Enable compression of sources and resources having a binary content type (to encode them)") cmd.Flags().StringArray("resource", nil, "Add a resource") cmd.Flags().StringArray("open-api", nil, "Add an OpenAPI v2 spec") cmd.Flags().StringArrayP("volume", "v", nil, "Mount a volume into the integration container. E.g \"-v pvcname:/container/path\"") @@ -108,7 +107,6 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) (*cobra.Command, *runCmdOptions) type runCmdOptions struct { *RootCmdOptions `json:"-"` Compression bool `mapstructure:"compression" yaml:",omitempty"` - CompressBinary bool `mapstructure:"compress-binary" yaml:",omitempty"` Wait bool `mapstructure:"wait" yaml:",omitempty"` Logs bool `mapstructure:"logs" yaml:",omitempty"` Sync bool `mapstructure:"sync" yaml:",omitempty"` diff --git a/pkg/cmd/run_test.go b/pkg/cmd/run_test.go index 2dda764b28..eddb32fd0f 100644 --- a/pkg/cmd/run_test.go +++ b/pkg/cmd/run_test.go @@ -65,7 +65,6 @@ func TestRunNoFlag(t *testing.T) { assert.Equal(t, false, runCmdOptions.Dev) assert.Equal(t, true, runCmdOptions.UseFlows) assert.Equal(t, false, runCmdOptions.Compression) - assert.Equal(t, true, runCmdOptions.CompressBinary) assert.Equal(t, false, runCmdOptions.Save) } @@ -75,18 +74,11 @@ func TestRunNonExistingFlag(t *testing.T) { assert.NotNil(t, err) } -func TestRunCompressBinaryFlag(t *testing.T) { - runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t) - _, err := test.ExecuteCommand(rootCmd, cmdRun, "--compress-binary=false", integrationSource) - assert.Nil(t, err) - assert.Equal(t, false, runCmdOptions.CompressBinary) -} - func TestRunCompressionFlag(t *testing.T) { runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t) _, err := test.ExecuteCommand(rootCmd, cmdRun, "--compression", integrationSource) assert.Nil(t, err) - assert.Equal(t, true, runCmdOptions.CompressBinary) + assert.Equal(t, true, runCmdOptions.Compression) } func TestRunConfigMapFlag(t *testing.T) {