Content-Length: 313352 | pFad | http://github.com/helm/helm/commit/#start-of-content

6787BA2C Merge pull request #13600 from gjenkins8/cleanup_NewShowWithConfig · helm/helm@53a4a59 · GitHub
Skip to content

Commit

Permalink
Merge pull request #13600 from gjenkins8/cleanup_NewShowWithConfig
Browse files Browse the repository at this point in the history
cleanup: `NewShowWithConfig` -> `NewShow`
  • Loading branch information
gjenkins8 authored Jan 14, 2025
2 parents fb54996 + 8468de4 commit 53a4a59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cmd/helm/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ of the CustomResourceDefinition files
`

func newShowCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
client := action.NewShowWithConfig(action.ShowAll, cfg)
client := action.NewShow(action.ShowAll, cfg)

showCommand := &cobra.Command{
Use: "show",
Expand Down
11 changes: 1 addition & 10 deletions pkg/action/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,7 @@ type Show struct {
}

// NewShow creates a new Show object with the given configuration.
// Deprecated: Use NewShowWithConfig
// TODO Helm 4: Fold NewShowWithConfig back into NewShow
func NewShow(output ShowOutputFormat) *Show {
return &Show{
OutputFormat: output,
}
}

// NewShowWithConfig creates a new Show object with the given configuration.
func NewShowWithConfig(output ShowOutputFormat, cfg *Configuration) *Show {
func NewShow(output ShowOutputFormat, cfg *Configuration) *Show {
sh := &Show{
OutputFormat: output,
}
Expand Down
14 changes: 9 additions & 5 deletions pkg/action/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

func TestShow(t *testing.T) {
config := actionConfigFixture(t)
client := NewShowWithConfig(ShowAll, config)
client := NewShow(ShowAll, config)
client.chart = &chart.Chart{
Metadata: &chart.Metadata{Name: "alpine"},
Files: []*chart.File{
Expand Down Expand Up @@ -65,7 +65,8 @@ bar
}

func TestShowNoValues(t *testing.T) {
client := NewShow(ShowAll)
config := actionConfigFixture(t)
client := NewShow(ShowAll, config)
client.chart = new(chart.Chart)

// Regression tests for missing values. See issue #1024.
Expand All @@ -81,7 +82,8 @@ func TestShowNoValues(t *testing.T) {
}

func TestShowValuesByJsonPathFormat(t *testing.T) {
client := NewShow(ShowValues)
config := actionConfigFixture(t)
client := NewShow(ShowValues, config)
client.JSONPathTemplate = "{$.nestedKey.simpleKey}"
client.chart = buildChart(withSampleValues())
output, err := client.Run("")
Expand All @@ -95,7 +97,8 @@ func TestShowValuesByJsonPathFormat(t *testing.T) {
}

func TestShowCRDs(t *testing.T) {
client := NewShow(ShowCRDs)
config := actionConfigFixture(t)
client := NewShow(ShowCRDs, config)
client.chart = &chart.Chart{
Metadata: &chart.Metadata{Name: "alpine"},
Files: []*chart.File{
Expand Down Expand Up @@ -123,7 +126,8 @@ bar
}

func TestShowNoReadme(t *testing.T) {
client := NewShow(ShowAll)
config := actionConfigFixture(t)
client := NewShow(ShowAll, config)
client.chart = &chart.Chart{
Metadata: &chart.Metadata{Name: "alpine"},
Files: []*chart.File{
Expand Down

0 comments on commit 53a4a59

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/helm/helm/commit/#start-of-content

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy