Content-Length: 345567 | pFad | http://github.com/helm/helm/pull/13600/files

72 cleanup: `NewShowWithConfig` -> `NewShow` by gjenkins8 · Pull Request #13600 · helm/helm · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: NewShowWithConfig -> NewShow #13600

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading








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/pull/13600/files

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy