Skip to content

Commit

Permalink
feat(cmd): compress-binary no longer needed
Browse files Browse the repository at this point in the history
With apache#1946 we are no longer needing a special `compress-binary` flag
  • Loading branch information
squakez committed Feb 3, 2021
1 parent 3a4508f commit bb73a91
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 0 additions & 2 deletions pkg/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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\"")
Expand All @@ -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"`
Expand Down
10 changes: 1 addition & 9 deletions pkg/cmd/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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) {
Expand Down

0 comments on commit bb73a91

Please sign in to comment.