diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 7cce9436f..4bdd9a388 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -17,12 +17,10 @@ limitations under the License. package main // import "helm.sh/helm/v4/cmd/helm" import ( - "fmt" "io" "log" "os" "strings" - "time" "github.com/spf13/cobra" "sigs.k8s.io/yaml" @@ -32,6 +30,7 @@ import ( "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli" + helmcmd "helm.sh/helm/v4/pkg/cmd" "helm.sh/helm/v4/pkg/kube" kubefake "helm.sh/helm/v4/pkg/kube/fake" release "helm.sh/helm/v4/pkg/release/v1" @@ -44,19 +43,6 @@ func init() { log.SetFlags(log.Lshortfile) } -func debug(format string, v ...interface{}) { - if settings.Debug { - timeNow := time.Now().String() - format = fmt.Sprintf("%s [debug] %s\n", timeNow, format) - log.Output(2, fmt.Sprintf(format, v...)) - } -} - -func warning(format string, v ...interface{}) { - format = fmt.Sprintf("WARNING: %s\n", format) - fmt.Fprintf(os.Stderr, format, v...) -} - // hookOutputWriter provides the writer for writing hook logs. func hookOutputWriter(_, _, _ string) io.Writer { return log.Writer() @@ -70,16 +56,15 @@ func main() { kube.ManagedFieldsManager = "helm" actionConfig := new(action.Configuration) - cmd, err := newRootCmd(actionConfig, os.Stdout, os.Args[1:]) + cmd, err := helmcmd.NewRootCmd(actionConfig, os.Stdout, os.Args[1:]) if err != nil { - warning("%+v", err) + helmcmd.Warning("%+v", err) os.Exit(1) } - // run when each command's execute method is called cobra.OnInitialize(func() { helmDriver := os.Getenv("HELM_DRIVER") - if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, debug); err != nil { + if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, helmcmd.Debug); err != nil { log.Fatal(err) } if helmDriver == "memory" { @@ -89,10 +74,10 @@ func main() { }) if err := cmd.Execute(); err != nil { - debug("%+v", err) + helmcmd.Debug("%+v", err) switch e := err.(type) { - case pluginError: - os.Exit(e.code) + case helmcmd.PluginError: + os.Exit(e.Code) default: os.Exit(1) } diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index a1d2b8505..5431daad0 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -18,153 +18,12 @@ package main import ( "bytes" - "io" "os" "os/exec" "runtime" - "strings" "testing" - - shellwords "github.com/mattn/go-shellwords" - "github.com/spf13/cobra" - - "helm.sh/helm/v4/internal/test" - "helm.sh/helm/v4/pkg/action" - chartutil "helm.sh/helm/v4/pkg/chart/v2/util" - "helm.sh/helm/v4/pkg/cli" - kubefake "helm.sh/helm/v4/pkg/kube/fake" - release "helm.sh/helm/v4/pkg/release/v1" - "helm.sh/helm/v4/pkg/storage" - "helm.sh/helm/v4/pkg/storage/driver" - "helm.sh/helm/v4/pkg/time" ) -func testTimestamper() time.Time { return time.Unix(242085845, 0).UTC() } - -func init() { - action.Timestamper = testTimestamper -} - -func runTestCmd(t *testing.T, tests []cmdTestCase) { - t.Helper() - for _, tt := range tests { - for i := 0; i <= tt.repeat; i++ { - t.Run(tt.name, func(t *testing.T) { - defer resetEnv()() - - storage := storageFixture() - for _, rel := range tt.rels { - if err := storage.Create(rel); err != nil { - t.Fatal(err) - } - } - t.Logf("running cmd (attempt %d): %s", i+1, tt.cmd) - _, out, err := executeActionCommandC(storage, tt.cmd) - if tt.wantError && err == nil { - t.Errorf("expected error, got success with the following output:\n%s", out) - } - if !tt.wantError && err != nil { - t.Errorf("expected no error, got: '%v'", err) - } - if tt.golden != "" { - test.AssertGoldenString(t, out, tt.golden) - } - }) - } - } -} - -func storageFixture() *storage.Storage { - return storage.Init(driver.NewMemory()) -} - -func executeActionCommandC(store *storage.Storage, cmd string) (*cobra.Command, string, error) { - return executeActionCommandStdinC(store, nil, cmd) -} - -func executeActionCommandStdinC(store *storage.Storage, in *os.File, cmd string) (*cobra.Command, string, error) { - args, err := shellwords.Parse(cmd) - if err != nil { - return nil, "", err - } - - buf := new(bytes.Buffer) - - actionConfig := &action.Configuration{ - Releases: store, - KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, - Capabilities: chartutil.DefaultCapabilities, - Log: func(_ string, _ ...interface{}) {}, - } - - root, err := newRootCmd(actionConfig, buf, args) - if err != nil { - return nil, "", err - } - - root.SetOut(buf) - root.SetErr(buf) - root.SetArgs(args) - - oldStdin := os.Stdin - if in != nil { - root.SetIn(in) - os.Stdin = in - } - - if mem, ok := store.Driver.(*driver.Memory); ok { - mem.SetNamespace(settings.Namespace()) - } - c, err := root.ExecuteC() - - result := buf.String() - - os.Stdin = oldStdin - - return c, result, err -} - -// cmdTestCase describes a test case that works with releases. -type cmdTestCase struct { - name string - cmd string - golden string - wantError bool - // Rels are the available releases at the start of the test. - rels []*release.Release - // Number of repeats (in case a feature was previously flaky and the test checks - // it's now stably producing identical results). 0 means test is run exactly once. - repeat int -} - -func executeActionCommand(cmd string) (*cobra.Command, string, error) { - return executeActionCommandC(storageFixture(), cmd) -} - -func resetEnv() func() { - origEnv := os.Environ() - return func() { - os.Clearenv() - for _, pair := range origEnv { - kv := strings.SplitN(pair, "=", 2) - os.Setenv(kv[0], kv[1]) - } - settings = cli.New() - } -} - -func testChdir(t *testing.T, dir string) func() { - t.Helper() - old, err := os.Getwd() - if err != nil { - t.Fatal(err) - } - if err := os.Chdir(dir); err != nil { - t.Fatal(err) - } - return func() { os.Chdir(old) } -} - func TestPluginExitCode(t *testing.T) { if os.Getenv("RUN_MAIN_FOR_TESTING") == "1" { os.Args = []string{"helm", "exitwith", "2"} @@ -190,10 +49,8 @@ func TestPluginExitCode(t *testing.T) { "RUN_MAIN_FOR_TESTING=1", // See pkg/cli/environment.go for which envvars can be used for configuring these passes // and also see plugin_test.go for how a plugin env can be set up. - // We just does the same setup as plugin_test.go via envvars - "HELM_PLUGINS=testdata/helmhome/helm/plugins", - "HELM_REPOSITORY_CONFIG=testdata/helmhome/helm/repositories.yaml", - "HELM_REPOSITORY_CACHE=testdata/helmhome/helm/repository", + // This mimics the "exitwith" test case in TestLoadPlugins using envvars + "HELM_PLUGINS=../../pkg/cmd/testdata/helmhome/helm/plugins", ) stdout := &bytes.Buffer{} stderr := &bytes.Buffer{} diff --git a/cmd/helm/completion.go b/pkg/cmd/completion.go similarity index 99% rename from cmd/helm/completion.go rename to pkg/cmd/completion.go index 5d2186939..6f6dbd25d 100644 --- a/cmd/helm/completion.go +++ b/pkg/cmd/completion.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) const completionDesc = ` diff --git a/cmd/helm/completion_test.go b/pkg/cmd/completion_test.go similarity index 99% rename from cmd/helm/completion_test.go rename to pkg/cmd/completion_test.go index b1089596b..872da25f3 100644 --- a/cmd/helm/completion_test.go +++ b/pkg/cmd/completion_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/create.go b/pkg/cmd/create.go similarity index 98% rename from cmd/helm/create.go rename to pkg/cmd/create.go index 11c208231..435c8ca82 100644 --- a/cmd/helm/create.go +++ b/pkg/cmd/create.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" chart "helm.sh/helm/v4/pkg/chart/v2" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/helmpath" ) diff --git a/cmd/helm/create_test.go b/pkg/cmd/create_test.go similarity index 99% rename from cmd/helm/create_test.go rename to pkg/cmd/create_test.go index a8361329e..bfdf3db5a 100644 --- a/cmd/helm/create_test.go +++ b/pkg/cmd/create_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/dependency.go b/pkg/cmd/dependency.go similarity index 98% rename from cmd/helm/dependency.go rename to pkg/cmd/dependency.go index 5e108b6fd..34bbff6be 100644 --- a/cmd/helm/dependency.go +++ b/pkg/cmd/dependency.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const dependencyDesc = ` diff --git a/cmd/helm/dependency_build.go b/pkg/cmd/dependency_build.go similarity index 98% rename from cmd/helm/dependency_build.go rename to pkg/cmd/dependency_build.go index 719c720a7..16907facf 100644 --- a/cmd/helm/dependency_build.go +++ b/pkg/cmd/dependency_build.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,8 +24,8 @@ import ( "github.com/spf13/cobra" "k8s.io/client-go/util/homedir" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" ) diff --git a/cmd/helm/dependency_build_test.go b/pkg/cmd/dependency_build_test.go similarity index 99% rename from cmd/helm/dependency_build_test.go rename to pkg/cmd/dependency_build_test.go index 022621fe4..a4a89b7a9 100644 --- a/cmd/helm/dependency_build_test.go +++ b/pkg/cmd/dependency_build_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/dependency_test.go b/pkg/cmd/dependency_test.go similarity index 99% rename from cmd/helm/dependency_test.go rename to pkg/cmd/dependency_test.go index 34c6a25e1..d6bcebf1b 100644 --- a/cmd/helm/dependency_test.go +++ b/pkg/cmd/dependency_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "runtime" diff --git a/cmd/helm/dependency_update.go b/pkg/cmd/dependency_update.go similarity index 98% rename from cmd/helm/dependency_update.go rename to pkg/cmd/dependency_update.go index 563d7eba5..921e5ef49 100644 --- a/cmd/helm/dependency_update.go +++ b/pkg/cmd/dependency_update.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" ) diff --git a/cmd/helm/dependency_update_test.go b/pkg/cmd/dependency_update_test.go similarity index 99% rename from cmd/helm/dependency_update_test.go rename to pkg/cmd/dependency_update_test.go index 855675f78..890767720 100644 --- a/cmd/helm/dependency_update_test.go +++ b/pkg/cmd/dependency_update_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/docs.go b/pkg/cmd/docs.go similarity index 98% rename from cmd/helm/docs.go rename to pkg/cmd/docs.go index 571840b5f..b3fd773f9 100644 --- a/cmd/helm/docs.go +++ b/pkg/cmd/docs.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -28,7 +28,7 @@ import ( "golang.org/x/text/cases" "golang.org/x/text/language" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) const docsDesc = ` diff --git a/cmd/helm/docs_test.go b/pkg/cmd/docs_test.go similarity index 98% rename from cmd/helm/docs_test.go rename to pkg/cmd/docs_test.go index fe5864d5e..4a8a8c687 100644 --- a/cmd/helm/docs_test.go +++ b/pkg/cmd/docs_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/env.go b/pkg/cmd/env.go similarity index 97% rename from cmd/helm/env.go rename to pkg/cmd/env.go index c7305434b..8da201031 100644 --- a/cmd/helm/env.go +++ b/pkg/cmd/env.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) var envHelp = ` diff --git a/cmd/helm/env_test.go b/pkg/cmd/env_test.go similarity index 98% rename from cmd/helm/env_test.go rename to pkg/cmd/env_test.go index 01ef25933..c5d7af1b7 100644 --- a/cmd/helm/env_test.go +++ b/pkg/cmd/env_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/flags.go b/pkg/cmd/flags.go similarity index 99% rename from cmd/helm/flags.go rename to pkg/cmd/flags.go index 7bb56dcb3..10c7e9714 100644 --- a/cmd/helm/flags.go +++ b/pkg/cmd/flags.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "flag" diff --git a/cmd/helm/flags_test.go b/pkg/cmd/flags_test.go similarity index 99% rename from cmd/helm/flags_test.go rename to pkg/cmd/flags_test.go index 62a6fdcd4..9d416f216 100644 --- a/cmd/helm/flags_test.go +++ b/pkg/cmd/flags_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/get.go b/pkg/cmd/get.go similarity index 96% rename from cmd/helm/get.go rename to pkg/cmd/get.go index 27d536f8b..1e672beea 100644 --- a/cmd/helm/get.go +++ b/pkg/cmd/get.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) var getHelp = ` diff --git a/cmd/helm/get_all.go b/pkg/cmd/get_all.go similarity index 97% rename from cmd/helm/get_all.go rename to pkg/cmd/get_all.go index 522327b67..aee92df51 100644 --- a/cmd/helm/get_all.go +++ b/pkg/cmd/get_all.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -22,9 +22,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) var getAllHelp = ` diff --git a/cmd/helm/get_all_test.go b/pkg/cmd/get_all_test.go similarity index 99% rename from cmd/helm/get_all_test.go rename to pkg/cmd/get_all_test.go index 5de01bfcf..80bb7d332 100644 --- a/cmd/helm/get_all_test.go +++ b/pkg/cmd/get_all_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_hooks.go b/pkg/cmd/get_hooks.go similarity index 97% rename from cmd/helm/get_hooks.go rename to pkg/cmd/get_hooks.go index 25c6eb4e3..7ffefd93c 100644 --- a/cmd/helm/get_hooks.go +++ b/pkg/cmd/get_hooks.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const getHooksHelp = ` diff --git a/cmd/helm/get_hooks_test.go b/pkg/cmd/get_hooks_test.go similarity index 99% rename from cmd/helm/get_hooks_test.go rename to pkg/cmd/get_hooks_test.go index fa18204e3..3be1d8500 100644 --- a/cmd/helm/get_hooks_test.go +++ b/pkg/cmd/get_hooks_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_manifest.go b/pkg/cmd/get_manifest.go similarity index 97% rename from cmd/helm/get_manifest.go rename to pkg/cmd/get_manifest.go index d2a4bbe96..021495d8d 100644 --- a/cmd/helm/get_manifest.go +++ b/pkg/cmd/get_manifest.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) var getManifestHelp = ` diff --git a/cmd/helm/get_manifest_test.go b/pkg/cmd/get_manifest_test.go similarity index 99% rename from cmd/helm/get_manifest_test.go rename to pkg/cmd/get_manifest_test.go index 96da50b75..cfb5215bf 100644 --- a/cmd/helm/get_manifest_test.go +++ b/pkg/cmd/get_manifest_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_metadata.go b/pkg/cmd/get_metadata.go similarity index 98% rename from cmd/helm/get_metadata.go rename to pkg/cmd/get_metadata.go index 4ab0c8cab..9f58e0f4e 100644 --- a/cmd/helm/get_metadata.go +++ b/pkg/cmd/get_metadata.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,9 +24,9 @@ import ( "github.com/spf13/cobra" k8sLabels "k8s.io/apimachinery/pkg/labels" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) type metadataWriter struct { diff --git a/cmd/helm/get_metadata_test.go b/pkg/cmd/get_metadata_test.go similarity index 99% rename from cmd/helm/get_metadata_test.go rename to pkg/cmd/get_metadata_test.go index 29ca77253..a2ab2cba1 100644 --- a/cmd/helm/get_metadata_test.go +++ b/pkg/cmd/get_metadata_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_notes.go b/pkg/cmd/get_notes.go similarity index 97% rename from cmd/helm/get_notes.go rename to pkg/cmd/get_notes.go index 8a8e67079..ae79d8bcc 100644 --- a/cmd/helm/get_notes.go +++ b/pkg/cmd/get_notes.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) var getNotesHelp = ` diff --git a/cmd/helm/get_notes_test.go b/pkg/cmd/get_notes_test.go similarity index 99% rename from cmd/helm/get_notes_test.go rename to pkg/cmd/get_notes_test.go index 88d9584b8..b451dfa05 100644 --- a/cmd/helm/get_notes_test.go +++ b/pkg/cmd/get_notes_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_test.go b/pkg/cmd/get_test.go similarity index 98% rename from cmd/helm/get_test.go rename to pkg/cmd/get_test.go index 79f914bea..cf81e4df7 100644 --- a/cmd/helm/get_test.go +++ b/pkg/cmd/get_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_values.go b/pkg/cmd/get_values.go similarity index 98% rename from cmd/helm/get_values.go rename to pkg/cmd/get_values.go index 8244fbaaa..02b195551 100644 --- a/cmd/helm/get_values.go +++ b/pkg/cmd/get_values.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) var getValuesHelp = ` diff --git a/cmd/helm/get_values_test.go b/pkg/cmd/get_values_test.go similarity index 99% rename from cmd/helm/get_values_test.go rename to pkg/cmd/get_values_test.go index 0fe141cf7..7bbe109f6 100644 --- a/cmd/helm/get_values_test.go +++ b/pkg/cmd/get_values_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/pkg/cmd/helpers_test.go b/pkg/cmd/helpers_test.go new file mode 100644 index 000000000..5f9f4e769 --- /dev/null +++ b/pkg/cmd/helpers_test.go @@ -0,0 +1,164 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "bytes" + "io" + "os" + "strings" + "testing" + + shellwords "github.com/mattn/go-shellwords" + "github.com/spf13/cobra" + + "helm.sh/helm/v4/internal/test" + "helm.sh/helm/v4/pkg/action" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" + "helm.sh/helm/v4/pkg/cli" + kubefake "helm.sh/helm/v4/pkg/kube/fake" + release "helm.sh/helm/v4/pkg/release/v1" + "helm.sh/helm/v4/pkg/storage" + "helm.sh/helm/v4/pkg/storage/driver" + "helm.sh/helm/v4/pkg/time" +) + +func testTimestamper() time.Time { return time.Unix(242085845, 0).UTC() } + +func init() { + action.Timestamper = testTimestamper +} + +func runTestCmd(t *testing.T, tests []cmdTestCase) { + t.Helper() + for _, tt := range tests { + for i := 0; i <= tt.repeat; i++ { + t.Run(tt.name, func(t *testing.T) { + defer resetEnv()() + + storage := storageFixture() + for _, rel := range tt.rels { + if err := storage.Create(rel); err != nil { + t.Fatal(err) + } + } + t.Logf("running cmd (attempt %d): %s", i+1, tt.cmd) + _, out, err := executeActionCommandC(storage, tt.cmd) + if tt.wantError && err == nil { + t.Errorf("expected error, got success with the following output:\n%s", out) + } + if !tt.wantError && err != nil { + t.Errorf("expected no error, got: '%v'", err) + } + if tt.golden != "" { + test.AssertGoldenString(t, out, tt.golden) + } + }) + } + } +} + +func storageFixture() *storage.Storage { + return storage.Init(driver.NewMemory()) +} + +func executeActionCommandC(store *storage.Storage, cmd string) (*cobra.Command, string, error) { + return executeActionCommandStdinC(store, nil, cmd) +} + +func executeActionCommandStdinC(store *storage.Storage, in *os.File, cmd string) (*cobra.Command, string, error) { + args, err := shellwords.Parse(cmd) + if err != nil { + return nil, "", err + } + + buf := new(bytes.Buffer) + + actionConfig := &action.Configuration{ + Releases: store, + KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, + Capabilities: chartutil.DefaultCapabilities, + Log: func(_ string, _ ...interface{}) {}, + } + + root, err := NewRootCmd(actionConfig, buf, args) + if err != nil { + return nil, "", err + } + + root.SetOut(buf) + root.SetErr(buf) + root.SetArgs(args) + + oldStdin := os.Stdin + if in != nil { + root.SetIn(in) + os.Stdin = in + } + + if mem, ok := store.Driver.(*driver.Memory); ok { + mem.SetNamespace(settings.Namespace()) + } + c, err := root.ExecuteC() + + result := buf.String() + + os.Stdin = oldStdin + + return c, result, err +} + +// cmdTestCase describes a test case that works with releases. +type cmdTestCase struct { + name string + cmd string + golden string + wantError bool + // Rels are the available releases at the start of the test. + rels []*release.Release + // Number of repeats (in case a feature was previously flaky and the test checks + // it's now stably producing identical results). 0 means test is run exactly once. + repeat int +} + +func executeActionCommand(cmd string) (*cobra.Command, string, error) { + return executeActionCommandC(storageFixture(), cmd) +} + +func resetEnv() func() { + origEnv := os.Environ() + return func() { + os.Clearenv() + for _, pair := range origEnv { + kv := strings.SplitN(pair, "=", 2) + os.Setenv(kv[0], kv[1]) + } + settings = cli.New() + } +} + +func testChdir(t *testing.T, dir string) func() { + t.Helper() + old, err := os.Getwd() + if err != nil { + t.Fatal(err) + } + if err := os.Chdir(dir); err != nil { + t.Fatal(err) + } + return func() { os.Chdir(old) } +} diff --git a/cmd/helm/history.go b/pkg/cmd/history.go similarity index 99% rename from cmd/helm/history.go rename to pkg/cmd/history.go index 86fad4b04..ec2a1bc12 100644 --- a/cmd/helm/history.go +++ b/pkg/cmd/history.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,10 +25,10 @@ import ( "github.com/gosuri/uitable" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" releaseutil "helm.sh/helm/v4/pkg/release/util" release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" diff --git a/cmd/helm/history_test.go b/pkg/cmd/history_test.go similarity index 99% rename from cmd/helm/history_test.go rename to pkg/cmd/history_test.go index 0df64cd1c..594d93d21 100644 --- a/cmd/helm/history_test.go +++ b/pkg/cmd/history_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/install.go b/pkg/cmd/install.go similarity index 98% rename from cmd/helm/install.go rename to pkg/cmd/install.go index cb22a436a..04055fde9 100644 --- a/cmd/helm/install.go +++ b/pkg/cmd/install.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "context" @@ -30,12 +30,12 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" release "helm.sh/helm/v4/pkg/release/v1" @@ -229,9 +229,9 @@ func addInstallFlags(cmd *cobra.Command, f *pflag.FlagSet, client *action.Instal } func runInstall(args []string, client *action.Install, valueOpts *values.Options, out io.Writer) (*release.Release, error) { - debug("Original chart version: %q", client.Version) + Debug("Original chart version: %q", client.Version) if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } @@ -246,7 +246,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options return nil, err } - debug("CHART PATH: %s\n", cp) + Debug("CHART PATH: %s\n", cp) p := getter.All(settings) vals, err := valueOpts.MergeValues(p) @@ -265,7 +265,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options } if chartRequested.Metadata.Deprecated { - warning("This chart is deprecated") + Warning("This chart is deprecated") } if req := chartRequested.Metadata.Dependencies; req != nil { diff --git a/cmd/helm/install_test.go b/pkg/cmd/install_test.go similarity index 99% rename from cmd/helm/install_test.go rename to pkg/cmd/install_test.go index be8480423..9cd244e84 100644 --- a/cmd/helm/install_test.go +++ b/pkg/cmd/install_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/lint.go b/pkg/cmd/lint.go similarity index 99% rename from cmd/helm/lint.go rename to pkg/cmd/lint.go index 279c5d34a..18a43a1ef 100644 --- a/cmd/helm/lint.go +++ b/pkg/cmd/lint.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/lint_test.go b/pkg/cmd/lint_test.go similarity index 99% rename from cmd/helm/lint_test.go rename to pkg/cmd/lint_test.go index 166b69ba0..401c84d74 100644 --- a/cmd/helm/lint_test.go +++ b/pkg/cmd/lint_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/list.go b/pkg/cmd/list.go similarity index 98% rename from cmd/helm/list.go rename to pkg/cmd/list.go index 9bbe580a2..85acbc97f 100644 --- a/cmd/helm/list.go +++ b/pkg/cmd/list.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,9 +25,9 @@ import ( "github.com/gosuri/uitable" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" release "helm.sh/helm/v4/pkg/release/v1" ) @@ -71,7 +71,7 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { ValidArgsFunction: noMoreArgsCompFunc, RunE: func(cmd *cobra.Command, _ []string) error { if client.AllNamespaces { - if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), debug); err != nil { + if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), Debug); err != nil { return err } } diff --git a/cmd/helm/list_test.go b/pkg/cmd/list_test.go similarity index 99% rename from cmd/helm/list_test.go rename to pkg/cmd/list_test.go index 6f9754459..82b25a768 100644 --- a/cmd/helm/list_test.go +++ b/pkg/cmd/list_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/load_plugins.go b/pkg/cmd/load_plugins.go similarity index 99% rename from cmd/helm/load_plugins.go rename to pkg/cmd/load_plugins.go index 23b1b7ff4..3cf701242 100644 --- a/cmd/helm/load_plugins.go +++ b/pkg/cmd/load_plugins.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -39,9 +39,9 @@ const ( pluginDynamicCompletionExecutable = "plugin.complete" ) -type pluginError struct { +type PluginError struct { error - code int + Code int } // loadPlugins loads plugins into the command list. @@ -138,9 +138,9 @@ func callPluginExecutable(pluginName string, main string, argv []string, out io. if eerr, ok := err.(*exec.ExitError); ok { os.Stderr.Write(eerr.Stderr) status := eerr.Sys().(syscall.WaitStatus) - return pluginError{ + return PluginError{ error: errors.Errorf("plugin %q exited with error", pluginName), - code: status.ExitStatus(), + Code: status.ExitStatus(), } } return err diff --git a/cmd/helm/package.go b/pkg/cmd/package.go similarity index 99% rename from cmd/helm/package.go rename to pkg/cmd/package.go index 185442b20..7bc22dfb4 100644 --- a/cmd/helm/package.go +++ b/pkg/cmd/package.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/package_test.go b/pkg/cmd/package_test.go similarity index 99% rename from cmd/helm/package_test.go rename to pkg/cmd/package_test.go index b86bae294..54358fc12 100644 --- a/cmd/helm/package_test.go +++ b/pkg/cmd/package_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/plugin.go b/pkg/cmd/plugin.go similarity index 97% rename from cmd/helm/plugin.go rename to pkg/cmd/plugin.go index 82fd34b72..3340e76e6 100644 --- a/cmd/helm/plugin.go +++ b/pkg/cmd/plugin.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -66,7 +66,7 @@ func runHook(p *plugin.Plugin, event string) error { prog := exec.Command(main, argv...) - debug("running %s hook: %s", event, prog) + Debug("running %s hook: %s", event, prog) prog.Stdout, prog.Stderr = os.Stdout, os.Stderr if err := prog.Run(); err != nil { diff --git a/cmd/helm/plugin_install.go b/pkg/cmd/plugin_install.go similarity index 96% rename from cmd/helm/plugin_install.go rename to pkg/cmd/plugin_install.go index d8dff6316..e17744cbb 100644 --- a/cmd/helm/plugin_install.go +++ b/pkg/cmd/plugin_install.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/plugin" "helm.sh/helm/v4/pkg/plugin/installer" ) @@ -79,7 +79,7 @@ func (o *pluginInstallOptions) run(out io.Writer) error { return err } - debug("loading plugin from %s", i.Path()) + Debug("loading plugin from %s", i.Path()) p, err := plugin.LoadDir(i.Path()) if err != nil { return errors.Wrap(err, "plugin is installed but unusable") diff --git a/cmd/helm/plugin_list.go b/pkg/cmd/plugin_list.go similarity index 97% rename from cmd/helm/plugin_list.go rename to pkg/cmd/plugin_list.go index 27ce3c973..9cca790ae 100644 --- a/cmd/helm/plugin_list.go +++ b/pkg/cmd/plugin_list.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -32,7 +32,7 @@ func newPluginListCmd(out io.Writer) *cobra.Command { Short: "list installed Helm plugins", ValidArgsFunction: noMoreArgsCompFunc, RunE: func(_ *cobra.Command, _ []string) error { - debug("pluginDirs: %s", settings.PluginsDirectory) + Debug("pluginDirs: %s", settings.PluginsDirectory) plugins, err := plugin.FindPlugins(settings.PluginsDirectory) if err != nil { return err diff --git a/cmd/helm/plugin_test.go b/pkg/cmd/plugin_test.go similarity index 98% rename from cmd/helm/plugin_test.go rename to pkg/cmd/plugin_test.go index cbaf05321..7c36698b1 100644 --- a/cmd/helm/plugin_test.go +++ b/pkg/cmd/plugin_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -143,12 +143,12 @@ func TestLoadPlugins(t *testing.T) { if runtime.GOOS != "windows" { if err := pp.RunE(pp, tt.args); err != nil { if tt.code > 0 { - perr, ok := err.(pluginError) + perr, ok := err.(PluginError) if !ok { t.Errorf("Expected %s to return pluginError: got %v(%T)", tt.use, err, err) } - if perr.code != tt.code { - t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.code) + if perr.Code != tt.code { + t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.Code) } } else { t.Errorf("Error running %s: %+v", tt.use, err) @@ -218,12 +218,12 @@ func TestLoadPluginsWithSpace(t *testing.T) { if runtime.GOOS != "windows" { if err := pp.RunE(pp, tt.args); err != nil { if tt.code > 0 { - perr, ok := err.(pluginError) + perr, ok := err.(PluginError) if !ok { t.Errorf("Expected %s to return pluginError: got %v(%T)", tt.use, err, err) } - if perr.code != tt.code { - t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.code) + if perr.Code != tt.code { + t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.Code) } } else { t.Errorf("Error running %s: %+v", tt.use, err) diff --git a/cmd/helm/plugin_uninstall.go b/pkg/cmd/plugin_uninstall.go similarity index 97% rename from cmd/helm/plugin_uninstall.go rename to pkg/cmd/plugin_uninstall.go index 6ef4e4f59..c1f90ca49 100644 --- a/cmd/helm/plugin_uninstall.go +++ b/pkg/cmd/plugin_uninstall.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -60,7 +60,7 @@ func (o *pluginUninstallOptions) complete(args []string) error { } func (o *pluginUninstallOptions) run(out io.Writer) error { - debug("loading installed plugins from %s", settings.PluginsDirectory) + Debug("loading installed plugins from %s", settings.PluginsDirectory) plugins, err := plugin.FindPlugins(settings.PluginsDirectory) if err != nil { return err diff --git a/cmd/helm/plugin_update.go b/pkg/cmd/plugin_update.go similarity index 95% rename from cmd/helm/plugin_update.go rename to pkg/cmd/plugin_update.go index 5d0465274..cbbd8994c 100644 --- a/cmd/helm/plugin_update.go +++ b/pkg/cmd/plugin_update.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -62,7 +62,7 @@ func (o *pluginUpdateOptions) complete(args []string) error { func (o *pluginUpdateOptions) run(out io.Writer) error { installer.Debug = settings.Debug - debug("loading installed plugins from %s", settings.PluginsDirectory) + Debug("loading installed plugins from %s", settings.PluginsDirectory) plugins, err := plugin.FindPlugins(settings.PluginsDirectory) if err != nil { return err @@ -104,7 +104,7 @@ func updatePlugin(p *plugin.Plugin) error { return err } - debug("loading plugin from %s", i.Path()) + Debug("loading plugin from %s", i.Path()) updatedPlugin, err := plugin.LoadDir(i.Path()) if err != nil { return err diff --git a/cmd/helm/printer.go b/pkg/cmd/printer.go similarity index 98% rename from cmd/helm/printer.go rename to pkg/cmd/printer.go index 7cf7bf994..30238f5bb 100644 --- a/cmd/helm/printer.go +++ b/pkg/cmd/printer.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" diff --git a/cmd/helm/profiling.go b/pkg/cmd/profiling.go similarity index 99% rename from cmd/helm/profiling.go rename to pkg/cmd/profiling.go index 950ad15da..45e7b9342 100644 --- a/cmd/helm/profiling.go +++ b/pkg/cmd/profiling.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "errors" diff --git a/cmd/helm/pull.go b/pkg/cmd/pull.go similarity index 97% rename from cmd/helm/pull.go rename to pkg/cmd/pull.go index 231db30bc..5d188ee4f 100644 --- a/cmd/helm/pull.go +++ b/pkg/cmd/pull.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const pullDesc = ` @@ -60,7 +60,7 @@ func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { RunE: func(_ *cobra.Command, args []string) error { client.Settings = settings if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } diff --git a/cmd/helm/pull_test.go b/pkg/cmd/pull_test.go similarity index 99% rename from cmd/helm/pull_test.go rename to pkg/cmd/pull_test.go index 1110a6bdf..c30c94b49 100644 --- a/cmd/helm/pull_test.go +++ b/pkg/cmd/pull_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/push.go b/pkg/cmd/push.go similarity index 98% rename from cmd/helm/push.go rename to pkg/cmd/push.go index f5b275b9d..94d322b9d 100644 --- a/cmd/helm/push.go +++ b/pkg/cmd/push.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/pusher" ) diff --git a/cmd/helm/push_test.go b/pkg/cmd/push_test.go similarity index 98% rename from cmd/helm/push_test.go rename to pkg/cmd/push_test.go index 8e56d99dc..80d08b48f 100644 --- a/cmd/helm/push_test.go +++ b/pkg/cmd/push_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/registry.go b/pkg/cmd/registry.go similarity index 98% rename from cmd/helm/registry.go rename to pkg/cmd/registry.go index f771dcb9c..fcd06f13b 100644 --- a/cmd/helm/registry.go +++ b/pkg/cmd/registry.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" diff --git a/cmd/helm/registry_login.go b/pkg/cmd/registry_login.go similarity index 97% rename from cmd/helm/registry_login.go rename to pkg/cmd/registry_login.go index 74ad4cebe..1dfb3c798 100644 --- a/cmd/helm/registry_login.go +++ b/pkg/cmd/registry_login.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bufio" @@ -27,8 +27,8 @@ import ( "github.com/moby/term" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const registryLoginDesc = ` @@ -122,7 +122,7 @@ func getUsernamePassword(usernameOpt string, passwordOpt string, passwordFromStd } } } else { - warning("Using --password via the CLI is insecure. Use --password-stdin.") + Warning("Using --password via the CLI is insecure. Use --password-stdin.") } return username, password, nil diff --git a/cmd/helm/registry_login_test.go b/pkg/cmd/registry_login_test.go similarity index 98% rename from cmd/helm/registry_login_test.go rename to pkg/cmd/registry_login_test.go index 517fe08e1..6e4f2116e 100644 --- a/cmd/helm/registry_login_test.go +++ b/pkg/cmd/registry_login_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/registry_logout.go b/pkg/cmd/registry_logout.go similarity index 96% rename from cmd/helm/registry_logout.go rename to pkg/cmd/registry_logout.go index 13190c8cf..300453705 100644 --- a/cmd/helm/registry_logout.go +++ b/pkg/cmd/registry_logout.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const registryLogoutDesc = ` diff --git a/cmd/helm/registry_logout_test.go b/pkg/cmd/registry_logout_test.go similarity index 98% rename from cmd/helm/registry_logout_test.go rename to pkg/cmd/registry_logout_test.go index 31f716725..31a21b277 100644 --- a/cmd/helm/registry_logout_test.go +++ b/pkg/cmd/registry_logout_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/release_testing.go b/pkg/cmd/release_testing.go similarity index 98% rename from cmd/helm/release_testing.go rename to pkg/cmd/release_testing.go index a8c57f5d9..4904aa9f1 100644 --- a/cmd/helm/release_testing.go +++ b/pkg/cmd/release_testing.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,9 +25,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) const releaseTestHelp = ` diff --git a/cmd/helm/release_testing_test.go b/pkg/cmd/release_testing_test.go similarity index 98% rename from cmd/helm/release_testing_test.go rename to pkg/cmd/release_testing_test.go index 680a9bd3e..43599ad0d 100644 --- a/cmd/helm/release_testing_test.go +++ b/pkg/cmd/release_testing_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/repo.go b/pkg/cmd/repo.go similarity index 96% rename from cmd/helm/repo.go rename to pkg/cmd/repo.go index 291f0bb10..925669e13 100644 --- a/cmd/helm/repo.go +++ b/pkg/cmd/repo.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) var repoHelm = ` diff --git a/cmd/helm/repo_add.go b/pkg/cmd/repo_add.go similarity index 99% rename from cmd/helm/repo_add.go rename to pkg/cmd/repo_add.go index cd3dc8a62..f6c0c11c0 100644 --- a/cmd/helm/repo_add.go +++ b/pkg/cmd/repo_add.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "context" @@ -31,7 +31,7 @@ import ( "golang.org/x/term" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_add_test.go b/pkg/cmd/repo_add_test.go similarity index 99% rename from cmd/helm/repo_add_test.go rename to pkg/cmd/repo_add_test.go index 35911d5ae..0f3a3de4f 100644 --- a/cmd/helm/repo_add_test.go +++ b/pkg/cmd/repo_add_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/repo_index.go b/pkg/cmd/repo_index.go similarity index 98% rename from cmd/helm/repo_index.go rename to pkg/cmd/repo_index.go index c84a3f1ab..13a0a9439 100644 --- a/cmd/helm/repo_index.go +++ b/pkg/cmd/repo_index.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_index_test.go b/pkg/cmd/repo_index_test.go similarity index 99% rename from cmd/helm/repo_index_test.go rename to pkg/cmd/repo_index_test.go index e63a7bf63..c865c8a5d 100644 --- a/cmd/helm/repo_index_test.go +++ b/pkg/cmd/repo_index_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" diff --git a/cmd/helm/repo_list.go b/pkg/cmd/repo_list.go similarity index 98% rename from cmd/helm/repo_list.go rename to pkg/cmd/repo_list.go index e0ad10147..5b6113a13 100644 --- a/cmd/helm/repo_list.go +++ b/pkg/cmd/repo_list.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_list_test.go b/pkg/cmd/repo_list_test.go similarity index 98% rename from cmd/helm/repo_list_test.go rename to pkg/cmd/repo_list_test.go index 90149ebda..1da5484cc 100644 --- a/cmd/helm/repo_list_test.go +++ b/pkg/cmd/repo_list_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/repo_remove.go b/pkg/cmd/repo_remove.go similarity index 98% rename from cmd/helm/repo_remove.go rename to pkg/cmd/repo_remove.go index 6b72b0710..97630810a 100644 --- a/cmd/helm/repo_remove.go +++ b/pkg/cmd/repo_remove.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_remove_test.go b/pkg/cmd/repo_remove_test.go similarity index 99% rename from cmd/helm/repo_remove_test.go rename to pkg/cmd/repo_remove_test.go index 7e6609671..b8bc7179a 100644 --- a/cmd/helm/repo_remove_test.go +++ b/pkg/cmd/repo_remove_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" diff --git a/cmd/helm/repo_test.go b/pkg/cmd/repo_test.go similarity index 98% rename from cmd/helm/repo_test.go rename to pkg/cmd/repo_test.go index 2b0df7c4c..6b89a66c3 100644 --- a/cmd/helm/repo_test.go +++ b/pkg/cmd/repo_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/repo_update.go b/pkg/cmd/repo_update.go similarity index 98% rename from cmd/helm/repo_update.go rename to pkg/cmd/repo_update.go index 1379385c1..25071377b 100644 --- a/cmd/helm/repo_update.go +++ b/pkg/cmd/repo_update.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_update_test.go b/pkg/cmd/repo_update_test.go similarity index 99% rename from cmd/helm/repo_update_test.go rename to pkg/cmd/repo_update_test.go index 7e379da91..5b27a6dfb 100644 --- a/cmd/helm/repo_update_test.go +++ b/pkg/cmd/repo_update_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" diff --git a/cmd/helm/require/args.go b/pkg/cmd/require/args.go similarity index 100% rename from cmd/helm/require/args.go rename to pkg/cmd/require/args.go diff --git a/cmd/helm/require/args_test.go b/pkg/cmd/require/args_test.go similarity index 100% rename from cmd/helm/require/args_test.go rename to pkg/cmd/require/args_test.go diff --git a/cmd/helm/rollback.go b/pkg/cmd/rollback.go similarity index 98% rename from cmd/helm/rollback.go rename to pkg/cmd/rollback.go index 83d3089e2..01a32b184 100644 --- a/cmd/helm/rollback.go +++ b/pkg/cmd/rollback.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,8 +24,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const rollbackDesc = ` diff --git a/cmd/helm/rollback_test.go b/pkg/cmd/rollback_test.go similarity index 99% rename from cmd/helm/rollback_test.go rename to pkg/cmd/rollback_test.go index a3bad2ef7..53c63613e 100644 --- a/cmd/helm/rollback_test.go +++ b/pkg/cmd/rollback_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/root.go b/pkg/cmd/root.go similarity index 97% rename from cmd/helm/root.go rename to pkg/cmd/root.go index dd3ddeab7..ff4dcecbc 100644 --- a/cmd/helm/root.go +++ b/pkg/cmd/root.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main // import "helm.sh/helm/v4/cmd/helm" +package cmd // import "helm.sh/helm/v4/pkg/cmd" import ( "context" @@ -32,6 +32,7 @@ import ( "helm.sh/helm/v4/internal/tlsutil" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/repo" ) @@ -89,7 +90,19 @@ By default, the default directories depend on the Operating System. The defaults | Windows | %TEMP%\helm | %APPDATA%\helm | %APPDATA%\helm | ` -func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) (*cobra.Command, error) { +var settings = cli.New() + +func Debug(format string, v ...interface{}) { + if settings.Debug { + log.Output(2, fmt.Sprintf("[debug] "+format+"\n", v...)) + } +} + +func Warning(format string, v ...interface{}) { + fmt.Fprintf(os.Stderr, "WARNING: "+format+"\n", v...) +} + +func NewRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) (*cobra.Command, error) { cmd := &cobra.Command{ Use: "helm", Short: "The Helm package manager for Kubernetes.", diff --git a/cmd/helm/root_test.go b/pkg/cmd/root_test.go similarity index 99% rename from cmd/helm/root_test.go rename to pkg/cmd/root_test.go index e30850900..9521a5aa2 100644 --- a/cmd/helm/root_test.go +++ b/pkg/cmd/root_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "os" diff --git a/cmd/helm/search.go b/pkg/cmd/search.go similarity index 98% rename from cmd/helm/search.go rename to pkg/cmd/search.go index 6c62d5d2e..4d110286d 100644 --- a/cmd/helm/search.go +++ b/pkg/cmd/search.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" diff --git a/cmd/helm/search/search.go b/pkg/cmd/search/search.go similarity index 100% rename from cmd/helm/search/search.go rename to pkg/cmd/search/search.go diff --git a/cmd/helm/search/search_test.go b/pkg/cmd/search/search_test.go similarity index 100% rename from cmd/helm/search/search_test.go rename to pkg/cmd/search/search_test.go diff --git a/cmd/helm/search_hub.go b/pkg/cmd/search_hub.go similarity index 99% rename from cmd/helm/search_hub.go rename to pkg/cmd/search_hub.go index 5bdb1092d..b7f25444e 100644 --- a/cmd/helm/search_hub.go +++ b/pkg/cmd/search_hub.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -89,7 +89,7 @@ func (o *searchHubOptions) run(out io.Writer, args []string) error { q := strings.Join(args, " ") results, err := c.Search(q) if err != nil { - debug("%s", err) + Debug("%s", err) return fmt.Errorf("unable to perform search against %q", o.searchEndpoint) } diff --git a/cmd/helm/search_hub_test.go b/pkg/cmd/search_hub_test.go similarity index 99% rename from cmd/helm/search_hub_test.go rename to pkg/cmd/search_hub_test.go index f3730275a..8e056f771 100644 --- a/cmd/helm/search_hub_test.go +++ b/pkg/cmd/search_hub_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/search_repo.go b/pkg/cmd/search_repo.go similarity index 97% rename from cmd/helm/search_repo.go rename to pkg/cmd/search_repo.go index 36e8a8c58..bc73e52b2 100644 --- a/cmd/helm/search_repo.go +++ b/pkg/cmd/search_repo.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bufio" @@ -30,8 +30,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/search" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/search" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/repo" ) @@ -130,17 +130,17 @@ func (o *searchRepoOptions) run(out io.Writer, args []string) error { } func (o *searchRepoOptions) setupSearchedVersion() { - debug("Original chart version: %q", o.version) + Debug("Original chart version: %q", o.version) if o.version != "" { return } if o.devel { // search for releases and prereleases (alpha, beta, and release candidate releases). - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") o.version = ">0.0.0-0" } else { // search only for stable releases, prerelease versions will be skipped - debug("setting version to >0.0.0") + Debug("setting version to >0.0.0") o.version = ">0.0.0" } } @@ -189,8 +189,8 @@ func (o *searchRepoOptions) buildIndex() (*search.Index, error) { f := filepath.Join(o.repoCacheDir, helmpath.CacheIndexFile(n)) ind, err := repo.LoadIndexFile(f) if err != nil { - warning("Repo %q is corrupt or missing. Try 'helm repo update'.", n) - warning("%s", err) + Warning("Repo %q is corrupt or missing. Try 'helm repo update'.", n) + Warning("%s", err) continue } diff --git a/cmd/helm/search_repo_test.go b/pkg/cmd/search_repo_test.go similarity index 99% rename from cmd/helm/search_repo_test.go rename to pkg/cmd/search_repo_test.go index 9039842f0..e7f104e05 100644 --- a/cmd/helm/search_repo_test.go +++ b/pkg/cmd/search_repo_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/search_test.go b/pkg/cmd/search_test.go similarity index 98% rename from cmd/helm/search_test.go rename to pkg/cmd/search_test.go index 6cf845b06..a0e5d84cb 100644 --- a/cmd/helm/search_test.go +++ b/pkg/cmd/search_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import "testing" diff --git a/cmd/helm/show.go b/pkg/cmd/show.go similarity index 97% rename from cmd/helm/show.go rename to pkg/cmd/show.go index 492de94f6..a02af6f18 100644 --- a/cmd/helm/show.go +++ b/pkg/cmd/show.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const showDesc = ` @@ -211,9 +211,9 @@ func addShowFlags(subCmd *cobra.Command, client *action.Show) { } func runShow(args []string, client *action.Show) (string, error) { - debug("Original chart version: %q", client.Version) + Debug("Original chart version: %q", client.Version) if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } diff --git a/cmd/helm/show_test.go b/pkg/cmd/show_test.go similarity index 99% rename from cmd/helm/show_test.go rename to pkg/cmd/show_test.go index 0598095b5..ab8cafc37 100644 --- a/cmd/helm/show_test.go +++ b/pkg/cmd/show_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/status.go b/pkg/cmd/status.go similarity index 99% rename from cmd/helm/status.go rename to pkg/cmd/status.go index d1e25dd45..2b1138786 100644 --- a/cmd/helm/status.go +++ b/pkg/cmd/status.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -28,10 +28,10 @@ import ( "k8s.io/kubectl/pkg/cmd/get" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" release "helm.sh/helm/v4/pkg/release/v1" ) diff --git a/cmd/helm/status_test.go b/pkg/cmd/status_test.go similarity index 99% rename from cmd/helm/status_test.go rename to pkg/cmd/status_test.go index 7063e203f..cb4e23c59 100644 --- a/cmd/helm/status_test.go +++ b/pkg/cmd/status_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/template.go b/pkg/cmd/template.go similarity index 99% rename from cmd/helm/template.go rename to pkg/cmd/template.go index 4c07dac98..25ff31ade 100644 --- a/cmd/helm/template.go +++ b/pkg/cmd/template.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -32,10 +32,10 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/cmd/require" releaseutil "helm.sh/helm/v4/pkg/release/util" ) diff --git a/cmd/helm/template_test.go b/pkg/cmd/template_test.go similarity index 99% rename from cmd/helm/template_test.go rename to pkg/cmd/template_test.go index 28e24ce63..c478fced4 100644 --- a/cmd/helm/template_test.go +++ b/pkg/cmd/template_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/testdata/helm home with space/helm/plugins/fullenv/completion.yaml b/pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/completion.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/plugins/fullenv/completion.yaml rename to pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/completion.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh b/pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh rename to pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh diff --git a/cmd/helm/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml b/pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml rename to pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/repositories.yaml b/pkg/cmd/testdata/helm home with space/helm/repositories.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repositories.yaml rename to pkg/cmd/testdata/helm home with space/helm/repositories.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/repository/test-name-charts.txt b/pkg/cmd/testdata/helm home with space/helm/repository/test-name-charts.txt similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repository/test-name-charts.txt rename to pkg/cmd/testdata/helm home with space/helm/repository/test-name-charts.txt diff --git a/cmd/helm/testdata/helm home with space/helm/repository/test-name-index.yaml b/pkg/cmd/testdata/helm home with space/helm/repository/test-name-index.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repository/test-name-index.yaml rename to pkg/cmd/testdata/helm home with space/helm/repository/test-name-index.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/repository/testing-index.yaml b/pkg/cmd/testdata/helm home with space/helm/repository/testing-index.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repository/testing-index.yaml rename to pkg/cmd/testdata/helm home with space/helm/repository/testing-index.yaml diff --git a/cmd/helm/testdata/helm-test-key.pub b/pkg/cmd/testdata/helm-test-key.pub similarity index 100% rename from cmd/helm/testdata/helm-test-key.pub rename to pkg/cmd/testdata/helm-test-key.pub diff --git a/cmd/helm/testdata/helm-test-key.secret b/pkg/cmd/testdata/helm-test-key.secret similarity index 100% rename from cmd/helm/testdata/helm-test-key.secret rename to pkg/cmd/testdata/helm-test-key.secret diff --git a/cmd/helm/testdata/helmhome/helm/plugins/args/args.sh b/pkg/cmd/testdata/helmhome/helm/plugins/args/args.sh similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/args/args.sh rename to pkg/cmd/testdata/helmhome/helm/plugins/args/args.sh diff --git a/cmd/helm/testdata/helmhome/helm/plugins/args/plugin.complete b/pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.complete similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/args/plugin.complete rename to pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.complete diff --git a/cmd/helm/testdata/helmhome/helm/plugins/args/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/args/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/echo/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/echo/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/echo/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/echo/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.complete b/pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.complete similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.complete rename to pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.complete diff --git a/cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/env/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/env/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/env/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/env/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/env/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/env/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/env/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/env/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/exitwith/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/exitwith/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/exitwith/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh b/pkg/cmd/testdata/helmhome/helm/plugins/exitwith/exitwith.sh similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh rename to pkg/cmd/testdata/helmhome/helm/plugins/exitwith/exitwith.sh diff --git a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/exitwith/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/exitwith/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/exitwith/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/fullenv/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/fullenv/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/fullenv/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh b/pkg/cmd/testdata/helmhome/helm/plugins/fullenv/fullenv.sh similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh rename to pkg/cmd/testdata/helmhome/helm/plugins/fullenv/fullenv.sh diff --git a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/fullenv/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/fullenv/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/fullenv/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/repositories.yaml b/pkg/cmd/testdata/helmhome/helm/repositories.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repositories.yaml rename to pkg/cmd/testdata/helmhome/helm/repositories.yaml diff --git a/cmd/helm/testdata/helmhome/helm/repository/test-name-charts.txt b/pkg/cmd/testdata/helmhome/helm/repository/test-name-charts.txt similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repository/test-name-charts.txt rename to pkg/cmd/testdata/helmhome/helm/repository/test-name-charts.txt diff --git a/cmd/helm/testdata/helmhome/helm/repository/test-name-index.yaml b/pkg/cmd/testdata/helmhome/helm/repository/test-name-index.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repository/test-name-index.yaml rename to pkg/cmd/testdata/helmhome/helm/repository/test-name-index.yaml diff --git a/cmd/helm/testdata/helmhome/helm/repository/testing-index.yaml b/pkg/cmd/testdata/helmhome/helm/repository/testing-index.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repository/testing-index.yaml rename to pkg/cmd/testdata/helmhome/helm/repository/testing-index.yaml diff --git a/cmd/helm/testdata/output/chart-with-subchart-update.txt b/pkg/cmd/testdata/output/chart-with-subchart-update.txt similarity index 100% rename from cmd/helm/testdata/output/chart-with-subchart-update.txt rename to pkg/cmd/testdata/output/chart-with-subchart-update.txt diff --git a/cmd/helm/testdata/output/dependency-list-archive.txt b/pkg/cmd/testdata/output/dependency-list-archive.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list-archive.txt rename to pkg/cmd/testdata/output/dependency-list-archive.txt diff --git a/cmd/helm/testdata/output/dependency-list-no-chart-linux.txt b/pkg/cmd/testdata/output/dependency-list-no-chart-linux.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list-no-chart-linux.txt rename to pkg/cmd/testdata/output/dependency-list-no-chart-linux.txt diff --git a/cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt b/pkg/cmd/testdata/output/dependency-list-no-requirements-linux.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt rename to pkg/cmd/testdata/output/dependency-list-no-requirements-linux.txt diff --git a/cmd/helm/testdata/output/dependency-list.txt b/pkg/cmd/testdata/output/dependency-list.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list.txt rename to pkg/cmd/testdata/output/dependency-list.txt diff --git a/cmd/helm/testdata/output/deprecated-chart.txt b/pkg/cmd/testdata/output/deprecated-chart.txt similarity index 100% rename from cmd/helm/testdata/output/deprecated-chart.txt rename to pkg/cmd/testdata/output/deprecated-chart.txt diff --git a/cmd/helm/testdata/output/docs-type-comp.txt b/pkg/cmd/testdata/output/docs-type-comp.txt similarity index 100% rename from cmd/helm/testdata/output/docs-type-comp.txt rename to pkg/cmd/testdata/output/docs-type-comp.txt diff --git a/cmd/helm/testdata/output/empty_default_comp.txt b/pkg/cmd/testdata/output/empty_default_comp.txt similarity index 100% rename from cmd/helm/testdata/output/empty_default_comp.txt rename to pkg/cmd/testdata/output/empty_default_comp.txt diff --git a/cmd/helm/testdata/output/empty_nofile_comp.txt b/pkg/cmd/testdata/output/empty_nofile_comp.txt similarity index 100% rename from cmd/helm/testdata/output/empty_nofile_comp.txt rename to pkg/cmd/testdata/output/empty_nofile_comp.txt diff --git a/cmd/helm/testdata/output/env-comp.txt b/pkg/cmd/testdata/output/env-comp.txt similarity index 100% rename from cmd/helm/testdata/output/env-comp.txt rename to pkg/cmd/testdata/output/env-comp.txt diff --git a/cmd/helm/testdata/output/get-all-no-args.txt b/pkg/cmd/testdata/output/get-all-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-all-no-args.txt rename to pkg/cmd/testdata/output/get-all-no-args.txt diff --git a/cmd/helm/testdata/output/get-hooks-no-args.txt b/pkg/cmd/testdata/output/get-hooks-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-hooks-no-args.txt rename to pkg/cmd/testdata/output/get-hooks-no-args.txt diff --git a/cmd/helm/testdata/output/get-hooks.txt b/pkg/cmd/testdata/output/get-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/get-hooks.txt rename to pkg/cmd/testdata/output/get-hooks.txt diff --git a/cmd/helm/testdata/output/get-manifest-no-args.txt b/pkg/cmd/testdata/output/get-manifest-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-manifest-no-args.txt rename to pkg/cmd/testdata/output/get-manifest-no-args.txt diff --git a/cmd/helm/testdata/output/get-manifest.txt b/pkg/cmd/testdata/output/get-manifest.txt similarity index 100% rename from cmd/helm/testdata/output/get-manifest.txt rename to pkg/cmd/testdata/output/get-manifest.txt diff --git a/cmd/helm/testdata/output/get-metadata-args.txt b/pkg/cmd/testdata/output/get-metadata-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-metadata-args.txt rename to pkg/cmd/testdata/output/get-metadata-args.txt diff --git a/cmd/helm/testdata/output/get-metadata.json b/pkg/cmd/testdata/output/get-metadata.json similarity index 100% rename from cmd/helm/testdata/output/get-metadata.json rename to pkg/cmd/testdata/output/get-metadata.json diff --git a/cmd/helm/testdata/output/get-metadata.txt b/pkg/cmd/testdata/output/get-metadata.txt similarity index 100% rename from cmd/helm/testdata/output/get-metadata.txt rename to pkg/cmd/testdata/output/get-metadata.txt diff --git a/cmd/helm/testdata/output/get-metadata.yaml b/pkg/cmd/testdata/output/get-metadata.yaml similarity index 100% rename from cmd/helm/testdata/output/get-metadata.yaml rename to pkg/cmd/testdata/output/get-metadata.yaml diff --git a/cmd/helm/testdata/output/get-notes-no-args.txt b/pkg/cmd/testdata/output/get-notes-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-notes-no-args.txt rename to pkg/cmd/testdata/output/get-notes-no-args.txt diff --git a/cmd/helm/testdata/output/get-notes.txt b/pkg/cmd/testdata/output/get-notes.txt similarity index 100% rename from cmd/helm/testdata/output/get-notes.txt rename to pkg/cmd/testdata/output/get-notes.txt diff --git a/cmd/helm/testdata/output/get-release-template.txt b/pkg/cmd/testdata/output/get-release-template.txt similarity index 100% rename from cmd/helm/testdata/output/get-release-template.txt rename to pkg/cmd/testdata/output/get-release-template.txt diff --git a/cmd/helm/testdata/output/get-release.txt b/pkg/cmd/testdata/output/get-release.txt similarity index 100% rename from cmd/helm/testdata/output/get-release.txt rename to pkg/cmd/testdata/output/get-release.txt diff --git a/cmd/helm/testdata/output/get-values-all.txt b/pkg/cmd/testdata/output/get-values-all.txt similarity index 100% rename from cmd/helm/testdata/output/get-values-all.txt rename to pkg/cmd/testdata/output/get-values-all.txt diff --git a/cmd/helm/testdata/output/get-values-args.txt b/pkg/cmd/testdata/output/get-values-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-values-args.txt rename to pkg/cmd/testdata/output/get-values-args.txt diff --git a/cmd/helm/testdata/output/get-values.txt b/pkg/cmd/testdata/output/get-values.txt similarity index 100% rename from cmd/helm/testdata/output/get-values.txt rename to pkg/cmd/testdata/output/get-values.txt diff --git a/cmd/helm/testdata/output/history-limit.txt b/pkg/cmd/testdata/output/history-limit.txt similarity index 100% rename from cmd/helm/testdata/output/history-limit.txt rename to pkg/cmd/testdata/output/history-limit.txt diff --git a/cmd/helm/testdata/output/history.json b/pkg/cmd/testdata/output/history.json similarity index 100% rename from cmd/helm/testdata/output/history.json rename to pkg/cmd/testdata/output/history.json diff --git a/cmd/helm/testdata/output/history.txt b/pkg/cmd/testdata/output/history.txt similarity index 100% rename from cmd/helm/testdata/output/history.txt rename to pkg/cmd/testdata/output/history.txt diff --git a/cmd/helm/testdata/output/history.yaml b/pkg/cmd/testdata/output/history.yaml similarity index 100% rename from cmd/helm/testdata/output/history.yaml rename to pkg/cmd/testdata/output/history.yaml diff --git a/cmd/helm/testdata/output/install-and-replace.txt b/pkg/cmd/testdata/output/install-and-replace.txt similarity index 100% rename from cmd/helm/testdata/output/install-and-replace.txt rename to pkg/cmd/testdata/output/install-and-replace.txt diff --git a/cmd/helm/testdata/output/install-and-take-ownership.txt b/pkg/cmd/testdata/output/install-and-take-ownership.txt similarity index 100% rename from cmd/helm/testdata/output/install-and-take-ownership.txt rename to pkg/cmd/testdata/output/install-and-take-ownership.txt diff --git a/cmd/helm/testdata/output/install-chart-bad-type.txt b/pkg/cmd/testdata/output/install-chart-bad-type.txt similarity index 100% rename from cmd/helm/testdata/output/install-chart-bad-type.txt rename to pkg/cmd/testdata/output/install-chart-bad-type.txt diff --git a/cmd/helm/testdata/output/install-dry-run-with-secret-hidden.txt b/pkg/cmd/testdata/output/install-dry-run-with-secret-hidden.txt similarity index 100% rename from cmd/helm/testdata/output/install-dry-run-with-secret-hidden.txt rename to pkg/cmd/testdata/output/install-dry-run-with-secret-hidden.txt diff --git a/cmd/helm/testdata/output/install-dry-run-with-secret.txt b/pkg/cmd/testdata/output/install-dry-run-with-secret.txt similarity index 100% rename from cmd/helm/testdata/output/install-dry-run-with-secret.txt rename to pkg/cmd/testdata/output/install-dry-run-with-secret.txt diff --git a/cmd/helm/testdata/output/install-hide-secret.txt b/pkg/cmd/testdata/output/install-hide-secret.txt similarity index 100% rename from cmd/helm/testdata/output/install-hide-secret.txt rename to pkg/cmd/testdata/output/install-hide-secret.txt diff --git a/cmd/helm/testdata/output/install-lib-chart.txt b/pkg/cmd/testdata/output/install-lib-chart.txt similarity index 100% rename from cmd/helm/testdata/output/install-lib-chart.txt rename to pkg/cmd/testdata/output/install-lib-chart.txt diff --git a/cmd/helm/testdata/output/install-name-template.txt b/pkg/cmd/testdata/output/install-name-template.txt similarity index 100% rename from cmd/helm/testdata/output/install-name-template.txt rename to pkg/cmd/testdata/output/install-name-template.txt diff --git a/cmd/helm/testdata/output/install-no-args.txt b/pkg/cmd/testdata/output/install-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/install-no-args.txt rename to pkg/cmd/testdata/output/install-no-args.txt diff --git a/cmd/helm/testdata/output/install-no-hooks.txt b/pkg/cmd/testdata/output/install-no-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/install-no-hooks.txt rename to pkg/cmd/testdata/output/install-no-hooks.txt diff --git a/cmd/helm/testdata/output/install-with-multiple-values-files.txt b/pkg/cmd/testdata/output/install-with-multiple-values-files.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-multiple-values-files.txt rename to pkg/cmd/testdata/output/install-with-multiple-values-files.txt diff --git a/cmd/helm/testdata/output/install-with-multiple-values.txt b/pkg/cmd/testdata/output/install-with-multiple-values.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-multiple-values.txt rename to pkg/cmd/testdata/output/install-with-multiple-values.txt diff --git a/cmd/helm/testdata/output/install-with-timeout.txt b/pkg/cmd/testdata/output/install-with-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-timeout.txt rename to pkg/cmd/testdata/output/install-with-timeout.txt diff --git a/cmd/helm/testdata/output/install-with-values-file.txt b/pkg/cmd/testdata/output/install-with-values-file.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-values-file.txt rename to pkg/cmd/testdata/output/install-with-values-file.txt diff --git a/cmd/helm/testdata/output/install-with-values.txt b/pkg/cmd/testdata/output/install-with-values.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-values.txt rename to pkg/cmd/testdata/output/install-with-values.txt diff --git a/cmd/helm/testdata/output/install-with-wait-for-jobs.txt b/pkg/cmd/testdata/output/install-with-wait-for-jobs.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-wait-for-jobs.txt rename to pkg/cmd/testdata/output/install-with-wait-for-jobs.txt diff --git a/cmd/helm/testdata/output/install-with-wait.txt b/pkg/cmd/testdata/output/install-with-wait.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-wait.txt rename to pkg/cmd/testdata/output/install-with-wait.txt diff --git a/cmd/helm/testdata/output/install.txt b/pkg/cmd/testdata/output/install.txt similarity index 100% rename from cmd/helm/testdata/output/install.txt rename to pkg/cmd/testdata/output/install.txt diff --git a/cmd/helm/testdata/output/issue-9027.txt b/pkg/cmd/testdata/output/issue-9027.txt similarity index 100% rename from cmd/helm/testdata/output/issue-9027.txt rename to pkg/cmd/testdata/output/issue-9027.txt diff --git a/cmd/helm/testdata/output/issue-totoml.txt b/pkg/cmd/testdata/output/issue-totoml.txt similarity index 100% rename from cmd/helm/testdata/output/issue-totoml.txt rename to pkg/cmd/testdata/output/issue-totoml.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt b/pkg/cmd/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt rename to pkg/cmd/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-bad-subcharts.txt b/pkg/cmd/testdata/output/lint-chart-with-bad-subcharts.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-bad-subcharts.txt rename to pkg/cmd/testdata/output/lint-chart-with-bad-subcharts.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt b/pkg/cmd/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt rename to pkg/cmd/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-deprecated-api-strict.txt b/pkg/cmd/testdata/output/lint-chart-with-deprecated-api-strict.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-deprecated-api-strict.txt rename to pkg/cmd/testdata/output/lint-chart-with-deprecated-api-strict.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-deprecated-api.txt b/pkg/cmd/testdata/output/lint-chart-with-deprecated-api.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-deprecated-api.txt rename to pkg/cmd/testdata/output/lint-chart-with-deprecated-api.txt diff --git a/cmd/helm/testdata/output/lint-quiet-with-error.txt b/pkg/cmd/testdata/output/lint-quiet-with-error.txt similarity index 100% rename from cmd/helm/testdata/output/lint-quiet-with-error.txt rename to pkg/cmd/testdata/output/lint-quiet-with-error.txt diff --git a/cmd/helm/testdata/output/lint-quiet-with-warning.txt b/pkg/cmd/testdata/output/lint-quiet-with-warning.txt similarity index 100% rename from cmd/helm/testdata/output/lint-quiet-with-warning.txt rename to pkg/cmd/testdata/output/lint-quiet-with-warning.txt diff --git a/cmd/helm/testdata/output/lint-quiet.txt b/pkg/cmd/testdata/output/lint-quiet.txt similarity index 100% rename from cmd/helm/testdata/output/lint-quiet.txt rename to pkg/cmd/testdata/output/lint-quiet.txt diff --git a/cmd/helm/testdata/output/list-all.txt b/pkg/cmd/testdata/output/list-all.txt similarity index 100% rename from cmd/helm/testdata/output/list-all.txt rename to pkg/cmd/testdata/output/list-all.txt diff --git a/cmd/helm/testdata/output/list-date-reversed.txt b/pkg/cmd/testdata/output/list-date-reversed.txt similarity index 100% rename from cmd/helm/testdata/output/list-date-reversed.txt rename to pkg/cmd/testdata/output/list-date-reversed.txt diff --git a/cmd/helm/testdata/output/list-date.txt b/pkg/cmd/testdata/output/list-date.txt similarity index 100% rename from cmd/helm/testdata/output/list-date.txt rename to pkg/cmd/testdata/output/list-date.txt diff --git a/cmd/helm/testdata/output/list-failed.txt b/pkg/cmd/testdata/output/list-failed.txt similarity index 100% rename from cmd/helm/testdata/output/list-failed.txt rename to pkg/cmd/testdata/output/list-failed.txt diff --git a/cmd/helm/testdata/output/list-filter.txt b/pkg/cmd/testdata/output/list-filter.txt similarity index 100% rename from cmd/helm/testdata/output/list-filter.txt rename to pkg/cmd/testdata/output/list-filter.txt diff --git a/cmd/helm/testdata/output/list-max.txt b/pkg/cmd/testdata/output/list-max.txt similarity index 100% rename from cmd/helm/testdata/output/list-max.txt rename to pkg/cmd/testdata/output/list-max.txt diff --git a/cmd/helm/testdata/output/list-namespace.txt b/pkg/cmd/testdata/output/list-namespace.txt similarity index 100% rename from cmd/helm/testdata/output/list-namespace.txt rename to pkg/cmd/testdata/output/list-namespace.txt diff --git a/cmd/helm/testdata/output/list-no-headers.txt b/pkg/cmd/testdata/output/list-no-headers.txt similarity index 100% rename from cmd/helm/testdata/output/list-no-headers.txt rename to pkg/cmd/testdata/output/list-no-headers.txt diff --git a/cmd/helm/testdata/output/list-offset.txt b/pkg/cmd/testdata/output/list-offset.txt similarity index 100% rename from cmd/helm/testdata/output/list-offset.txt rename to pkg/cmd/testdata/output/list-offset.txt diff --git a/cmd/helm/testdata/output/list-pending.txt b/pkg/cmd/testdata/output/list-pending.txt similarity index 100% rename from cmd/helm/testdata/output/list-pending.txt rename to pkg/cmd/testdata/output/list-pending.txt diff --git a/cmd/helm/testdata/output/list-reverse.txt b/pkg/cmd/testdata/output/list-reverse.txt similarity index 100% rename from cmd/helm/testdata/output/list-reverse.txt rename to pkg/cmd/testdata/output/list-reverse.txt diff --git a/cmd/helm/testdata/output/list-short-json.txt b/pkg/cmd/testdata/output/list-short-json.txt similarity index 100% rename from cmd/helm/testdata/output/list-short-json.txt rename to pkg/cmd/testdata/output/list-short-json.txt diff --git a/cmd/helm/testdata/output/list-short-yaml.txt b/pkg/cmd/testdata/output/list-short-yaml.txt similarity index 100% rename from cmd/helm/testdata/output/list-short-yaml.txt rename to pkg/cmd/testdata/output/list-short-yaml.txt diff --git a/cmd/helm/testdata/output/list-short.txt b/pkg/cmd/testdata/output/list-short.txt similarity index 100% rename from cmd/helm/testdata/output/list-short.txt rename to pkg/cmd/testdata/output/list-short.txt diff --git a/cmd/helm/testdata/output/list-superseded.txt b/pkg/cmd/testdata/output/list-superseded.txt similarity index 100% rename from cmd/helm/testdata/output/list-superseded.txt rename to pkg/cmd/testdata/output/list-superseded.txt diff --git a/cmd/helm/testdata/output/list-uninstalled.txt b/pkg/cmd/testdata/output/list-uninstalled.txt similarity index 100% rename from cmd/helm/testdata/output/list-uninstalled.txt rename to pkg/cmd/testdata/output/list-uninstalled.txt diff --git a/cmd/helm/testdata/output/list-uninstalling.txt b/pkg/cmd/testdata/output/list-uninstalling.txt similarity index 100% rename from cmd/helm/testdata/output/list-uninstalling.txt rename to pkg/cmd/testdata/output/list-uninstalling.txt diff --git a/cmd/helm/testdata/output/list.txt b/pkg/cmd/testdata/output/list.txt similarity index 100% rename from cmd/helm/testdata/output/list.txt rename to pkg/cmd/testdata/output/list.txt diff --git a/cmd/helm/testdata/output/object-order.txt b/pkg/cmd/testdata/output/object-order.txt similarity index 100% rename from cmd/helm/testdata/output/object-order.txt rename to pkg/cmd/testdata/output/object-order.txt diff --git a/cmd/helm/testdata/output/output-comp.txt b/pkg/cmd/testdata/output/output-comp.txt similarity index 100% rename from cmd/helm/testdata/output/output-comp.txt rename to pkg/cmd/testdata/output/output-comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_comp.txt b/pkg/cmd/testdata/output/plugin_args_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_comp.txt rename to pkg/cmd/testdata/output/plugin_args_comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_flag_comp.txt b/pkg/cmd/testdata/output/plugin_args_flag_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_flag_comp.txt rename to pkg/cmd/testdata/output/plugin_args_flag_comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_many_args_comp.txt b/pkg/cmd/testdata/output/plugin_args_many_args_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_many_args_comp.txt rename to pkg/cmd/testdata/output/plugin_args_many_args_comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_ns_comp.txt b/pkg/cmd/testdata/output/plugin_args_ns_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_ns_comp.txt rename to pkg/cmd/testdata/output/plugin_args_ns_comp.txt diff --git a/cmd/helm/testdata/output/plugin_echo_no_directive.txt b/pkg/cmd/testdata/output/plugin_echo_no_directive.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_echo_no_directive.txt rename to pkg/cmd/testdata/output/plugin_echo_no_directive.txt diff --git a/cmd/helm/testdata/output/plugin_list_comp.txt b/pkg/cmd/testdata/output/plugin_list_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_list_comp.txt rename to pkg/cmd/testdata/output/plugin_list_comp.txt diff --git a/cmd/helm/testdata/output/plugin_repeat_comp.txt b/pkg/cmd/testdata/output/plugin_repeat_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_repeat_comp.txt rename to pkg/cmd/testdata/output/plugin_repeat_comp.txt diff --git a/cmd/helm/testdata/output/release_list_comp.txt b/pkg/cmd/testdata/output/release_list_comp.txt similarity index 100% rename from cmd/helm/testdata/output/release_list_comp.txt rename to pkg/cmd/testdata/output/release_list_comp.txt diff --git a/cmd/helm/testdata/output/release_list_repeat_comp.txt b/pkg/cmd/testdata/output/release_list_repeat_comp.txt similarity index 100% rename from cmd/helm/testdata/output/release_list_repeat_comp.txt rename to pkg/cmd/testdata/output/release_list_repeat_comp.txt diff --git a/cmd/helm/testdata/output/repo-add.txt b/pkg/cmd/testdata/output/repo-add.txt similarity index 100% rename from cmd/helm/testdata/output/repo-add.txt rename to pkg/cmd/testdata/output/repo-add.txt diff --git a/cmd/helm/testdata/output/repo-add2.txt b/pkg/cmd/testdata/output/repo-add2.txt similarity index 100% rename from cmd/helm/testdata/output/repo-add2.txt rename to pkg/cmd/testdata/output/repo-add2.txt diff --git a/cmd/helm/testdata/output/repo_list_comp.txt b/pkg/cmd/testdata/output/repo_list_comp.txt similarity index 100% rename from cmd/helm/testdata/output/repo_list_comp.txt rename to pkg/cmd/testdata/output/repo_list_comp.txt diff --git a/cmd/helm/testdata/output/repo_repeat_comp.txt b/pkg/cmd/testdata/output/repo_repeat_comp.txt similarity index 100% rename from cmd/helm/testdata/output/repo_repeat_comp.txt rename to pkg/cmd/testdata/output/repo_repeat_comp.txt diff --git a/cmd/helm/testdata/output/revision-comp.txt b/pkg/cmd/testdata/output/revision-comp.txt similarity index 100% rename from cmd/helm/testdata/output/revision-comp.txt rename to pkg/cmd/testdata/output/revision-comp.txt diff --git a/cmd/helm/testdata/output/revision-wrong-args-comp.txt b/pkg/cmd/testdata/output/revision-wrong-args-comp.txt similarity index 100% rename from cmd/helm/testdata/output/revision-wrong-args-comp.txt rename to pkg/cmd/testdata/output/revision-wrong-args-comp.txt diff --git a/cmd/helm/testdata/output/rollback-comp.txt b/pkg/cmd/testdata/output/rollback-comp.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-comp.txt rename to pkg/cmd/testdata/output/rollback-comp.txt diff --git a/cmd/helm/testdata/output/rollback-no-args.txt b/pkg/cmd/testdata/output/rollback-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-no-args.txt rename to pkg/cmd/testdata/output/rollback-no-args.txt diff --git a/cmd/helm/testdata/output/rollback-no-revision.txt b/pkg/cmd/testdata/output/rollback-no-revision.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-no-revision.txt rename to pkg/cmd/testdata/output/rollback-no-revision.txt diff --git a/cmd/helm/testdata/output/rollback-non-existent-version.txt b/pkg/cmd/testdata/output/rollback-non-existent-version.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-non-existent-version.txt rename to pkg/cmd/testdata/output/rollback-non-existent-version.txt diff --git a/cmd/helm/testdata/output/rollback-timeout.txt b/pkg/cmd/testdata/output/rollback-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-timeout.txt rename to pkg/cmd/testdata/output/rollback-timeout.txt diff --git a/cmd/helm/testdata/output/rollback-wait-for-jobs.txt b/pkg/cmd/testdata/output/rollback-wait-for-jobs.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-wait-for-jobs.txt rename to pkg/cmd/testdata/output/rollback-wait-for-jobs.txt diff --git a/cmd/helm/testdata/output/rollback-wait.txt b/pkg/cmd/testdata/output/rollback-wait.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-wait.txt rename to pkg/cmd/testdata/output/rollback-wait.txt diff --git a/cmd/helm/testdata/output/rollback-wrong-args-comp.txt b/pkg/cmd/testdata/output/rollback-wrong-args-comp.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-wrong-args-comp.txt rename to pkg/cmd/testdata/output/rollback-wrong-args-comp.txt diff --git a/cmd/helm/testdata/output/rollback.txt b/pkg/cmd/testdata/output/rollback.txt similarity index 100% rename from cmd/helm/testdata/output/rollback.txt rename to pkg/cmd/testdata/output/rollback.txt diff --git a/cmd/helm/testdata/output/schema-negative-cli.txt b/pkg/cmd/testdata/output/schema-negative-cli.txt similarity index 100% rename from cmd/helm/testdata/output/schema-negative-cli.txt rename to pkg/cmd/testdata/output/schema-negative-cli.txt diff --git a/cmd/helm/testdata/output/schema-negative.txt b/pkg/cmd/testdata/output/schema-negative.txt similarity index 100% rename from cmd/helm/testdata/output/schema-negative.txt rename to pkg/cmd/testdata/output/schema-negative.txt diff --git a/cmd/helm/testdata/output/schema.txt b/pkg/cmd/testdata/output/schema.txt similarity index 100% rename from cmd/helm/testdata/output/schema.txt rename to pkg/cmd/testdata/output/schema.txt diff --git a/cmd/helm/testdata/output/search-constraint-single.txt b/pkg/cmd/testdata/output/search-constraint-single.txt similarity index 100% rename from cmd/helm/testdata/output/search-constraint-single.txt rename to pkg/cmd/testdata/output/search-constraint-single.txt diff --git a/cmd/helm/testdata/output/search-constraint.txt b/pkg/cmd/testdata/output/search-constraint.txt similarity index 100% rename from cmd/helm/testdata/output/search-constraint.txt rename to pkg/cmd/testdata/output/search-constraint.txt diff --git a/cmd/helm/testdata/output/search-multiple-devel-release.txt b/pkg/cmd/testdata/output/search-multiple-devel-release.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-devel-release.txt rename to pkg/cmd/testdata/output/search-multiple-devel-release.txt diff --git a/cmd/helm/testdata/output/search-multiple-stable-release.txt b/pkg/cmd/testdata/output/search-multiple-stable-release.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-stable-release.txt rename to pkg/cmd/testdata/output/search-multiple-stable-release.txt diff --git a/cmd/helm/testdata/output/search-multiple-versions-constraints.txt b/pkg/cmd/testdata/output/search-multiple-versions-constraints.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-versions-constraints.txt rename to pkg/cmd/testdata/output/search-multiple-versions-constraints.txt diff --git a/cmd/helm/testdata/output/search-multiple-versions.txt b/pkg/cmd/testdata/output/search-multiple-versions.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-versions.txt rename to pkg/cmd/testdata/output/search-multiple-versions.txt diff --git a/cmd/helm/testdata/output/search-not-found-error.txt b/pkg/cmd/testdata/output/search-not-found-error.txt similarity index 100% rename from cmd/helm/testdata/output/search-not-found-error.txt rename to pkg/cmd/testdata/output/search-not-found-error.txt diff --git a/cmd/helm/testdata/output/search-not-found.txt b/pkg/cmd/testdata/output/search-not-found.txt similarity index 100% rename from cmd/helm/testdata/output/search-not-found.txt rename to pkg/cmd/testdata/output/search-not-found.txt diff --git a/cmd/helm/testdata/output/search-output-json.txt b/pkg/cmd/testdata/output/search-output-json.txt similarity index 100% rename from cmd/helm/testdata/output/search-output-json.txt rename to pkg/cmd/testdata/output/search-output-json.txt diff --git a/cmd/helm/testdata/output/search-output-yaml.txt b/pkg/cmd/testdata/output/search-output-yaml.txt similarity index 100% rename from cmd/helm/testdata/output/search-output-yaml.txt rename to pkg/cmd/testdata/output/search-output-yaml.txt diff --git a/cmd/helm/testdata/output/search-regex.txt b/pkg/cmd/testdata/output/search-regex.txt similarity index 100% rename from cmd/helm/testdata/output/search-regex.txt rename to pkg/cmd/testdata/output/search-regex.txt diff --git a/cmd/helm/testdata/output/search-versions-constraint.txt b/pkg/cmd/testdata/output/search-versions-constraint.txt similarity index 100% rename from cmd/helm/testdata/output/search-versions-constraint.txt rename to pkg/cmd/testdata/output/search-versions-constraint.txt diff --git a/cmd/helm/testdata/output/status-comp.txt b/pkg/cmd/testdata/output/status-comp.txt similarity index 100% rename from cmd/helm/testdata/output/status-comp.txt rename to pkg/cmd/testdata/output/status-comp.txt diff --git a/cmd/helm/testdata/output/status-with-desc.txt b/pkg/cmd/testdata/output/status-with-desc.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-desc.txt rename to pkg/cmd/testdata/output/status-with-desc.txt diff --git a/cmd/helm/testdata/output/status-with-notes.txt b/pkg/cmd/testdata/output/status-with-notes.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-notes.txt rename to pkg/cmd/testdata/output/status-with-notes.txt diff --git a/cmd/helm/testdata/output/status-with-resources.json b/pkg/cmd/testdata/output/status-with-resources.json similarity index 100% rename from cmd/helm/testdata/output/status-with-resources.json rename to pkg/cmd/testdata/output/status-with-resources.json diff --git a/cmd/helm/testdata/output/status-with-resources.txt b/pkg/cmd/testdata/output/status-with-resources.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-resources.txt rename to pkg/cmd/testdata/output/status-with-resources.txt diff --git a/cmd/helm/testdata/output/status-with-test-suite.txt b/pkg/cmd/testdata/output/status-with-test-suite.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-test-suite.txt rename to pkg/cmd/testdata/output/status-with-test-suite.txt diff --git a/cmd/helm/testdata/output/status-wrong-args-comp.txt b/pkg/cmd/testdata/output/status-wrong-args-comp.txt similarity index 100% rename from cmd/helm/testdata/output/status-wrong-args-comp.txt rename to pkg/cmd/testdata/output/status-wrong-args-comp.txt diff --git a/cmd/helm/testdata/output/status.json b/pkg/cmd/testdata/output/status.json similarity index 100% rename from cmd/helm/testdata/output/status.json rename to pkg/cmd/testdata/output/status.json diff --git a/cmd/helm/testdata/output/status.txt b/pkg/cmd/testdata/output/status.txt similarity index 100% rename from cmd/helm/testdata/output/status.txt rename to pkg/cmd/testdata/output/status.txt diff --git a/cmd/helm/testdata/output/subchart-schema-cli-negative.txt b/pkg/cmd/testdata/output/subchart-schema-cli-negative.txt similarity index 100% rename from cmd/helm/testdata/output/subchart-schema-cli-negative.txt rename to pkg/cmd/testdata/output/subchart-schema-cli-negative.txt diff --git a/cmd/helm/testdata/output/subchart-schema-cli.txt b/pkg/cmd/testdata/output/subchart-schema-cli.txt similarity index 100% rename from cmd/helm/testdata/output/subchart-schema-cli.txt rename to pkg/cmd/testdata/output/subchart-schema-cli.txt diff --git a/cmd/helm/testdata/output/subchart-schema-negative.txt b/pkg/cmd/testdata/output/subchart-schema-negative.txt similarity index 100% rename from cmd/helm/testdata/output/subchart-schema-negative.txt rename to pkg/cmd/testdata/output/subchart-schema-negative.txt diff --git a/cmd/helm/testdata/output/template-chart-bad-type.txt b/pkg/cmd/testdata/output/template-chart-bad-type.txt similarity index 100% rename from cmd/helm/testdata/output/template-chart-bad-type.txt rename to pkg/cmd/testdata/output/template-chart-bad-type.txt diff --git a/cmd/helm/testdata/output/template-chart-with-template-lib-archive-dep.txt b/pkg/cmd/testdata/output/template-chart-with-template-lib-archive-dep.txt similarity index 100% rename from cmd/helm/testdata/output/template-chart-with-template-lib-archive-dep.txt rename to pkg/cmd/testdata/output/template-chart-with-template-lib-archive-dep.txt diff --git a/cmd/helm/testdata/output/template-chart-with-template-lib-dep.txt b/pkg/cmd/testdata/output/template-chart-with-template-lib-dep.txt similarity index 100% rename from cmd/helm/testdata/output/template-chart-with-template-lib-dep.txt rename to pkg/cmd/testdata/output/template-chart-with-template-lib-dep.txt diff --git a/cmd/helm/testdata/output/template-lib-chart.txt b/pkg/cmd/testdata/output/template-lib-chart.txt similarity index 100% rename from cmd/helm/testdata/output/template-lib-chart.txt rename to pkg/cmd/testdata/output/template-lib-chart.txt diff --git a/cmd/helm/testdata/output/template-name-template.txt b/pkg/cmd/testdata/output/template-name-template.txt similarity index 100% rename from cmd/helm/testdata/output/template-name-template.txt rename to pkg/cmd/testdata/output/template-name-template.txt diff --git a/cmd/helm/testdata/output/template-no-args.txt b/pkg/cmd/testdata/output/template-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/template-no-args.txt rename to pkg/cmd/testdata/output/template-no-args.txt diff --git a/cmd/helm/testdata/output/template-set.txt b/pkg/cmd/testdata/output/template-set.txt similarity index 100% rename from cmd/helm/testdata/output/template-set.txt rename to pkg/cmd/testdata/output/template-set.txt diff --git a/cmd/helm/testdata/output/template-show-only-glob.txt b/pkg/cmd/testdata/output/template-show-only-glob.txt similarity index 100% rename from cmd/helm/testdata/output/template-show-only-glob.txt rename to pkg/cmd/testdata/output/template-show-only-glob.txt diff --git a/cmd/helm/testdata/output/template-show-only-multiple.txt b/pkg/cmd/testdata/output/template-show-only-multiple.txt similarity index 100% rename from cmd/helm/testdata/output/template-show-only-multiple.txt rename to pkg/cmd/testdata/output/template-show-only-multiple.txt diff --git a/cmd/helm/testdata/output/template-show-only-one.txt b/pkg/cmd/testdata/output/template-show-only-one.txt similarity index 100% rename from cmd/helm/testdata/output/template-show-only-one.txt rename to pkg/cmd/testdata/output/template-show-only-one.txt diff --git a/cmd/helm/testdata/output/template-skip-tests.txt b/pkg/cmd/testdata/output/template-skip-tests.txt similarity index 100% rename from cmd/helm/testdata/output/template-skip-tests.txt rename to pkg/cmd/testdata/output/template-skip-tests.txt diff --git a/cmd/helm/testdata/output/template-subchart-cm-set-file.txt b/pkg/cmd/testdata/output/template-subchart-cm-set-file.txt similarity index 100% rename from cmd/helm/testdata/output/template-subchart-cm-set-file.txt rename to pkg/cmd/testdata/output/template-subchart-cm-set-file.txt diff --git a/cmd/helm/testdata/output/template-subchart-cm-set.txt b/pkg/cmd/testdata/output/template-subchart-cm-set.txt similarity index 100% rename from cmd/helm/testdata/output/template-subchart-cm-set.txt rename to pkg/cmd/testdata/output/template-subchart-cm-set.txt diff --git a/cmd/helm/testdata/output/template-subchart-cm.txt b/pkg/cmd/testdata/output/template-subchart-cm.txt similarity index 100% rename from cmd/helm/testdata/output/template-subchart-cm.txt rename to pkg/cmd/testdata/output/template-subchart-cm.txt diff --git a/cmd/helm/testdata/output/template-values-files.txt b/pkg/cmd/testdata/output/template-values-files.txt similarity index 100% rename from cmd/helm/testdata/output/template-values-files.txt rename to pkg/cmd/testdata/output/template-values-files.txt diff --git a/cmd/helm/testdata/output/template-with-api-version.txt b/pkg/cmd/testdata/output/template-with-api-version.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-api-version.txt rename to pkg/cmd/testdata/output/template-with-api-version.txt diff --git a/cmd/helm/testdata/output/template-with-crds.txt b/pkg/cmd/testdata/output/template-with-crds.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-crds.txt rename to pkg/cmd/testdata/output/template-with-crds.txt diff --git a/cmd/helm/testdata/output/template-with-invalid-yaml-debug.txt b/pkg/cmd/testdata/output/template-with-invalid-yaml-debug.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-invalid-yaml-debug.txt rename to pkg/cmd/testdata/output/template-with-invalid-yaml-debug.txt diff --git a/cmd/helm/testdata/output/template-with-invalid-yaml.txt b/pkg/cmd/testdata/output/template-with-invalid-yaml.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-invalid-yaml.txt rename to pkg/cmd/testdata/output/template-with-invalid-yaml.txt diff --git a/cmd/helm/testdata/output/template-with-kube-version.txt b/pkg/cmd/testdata/output/template-with-kube-version.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-kube-version.txt rename to pkg/cmd/testdata/output/template-with-kube-version.txt diff --git a/cmd/helm/testdata/output/template.txt b/pkg/cmd/testdata/output/template.txt similarity index 100% rename from cmd/helm/testdata/output/template.txt rename to pkg/cmd/testdata/output/template.txt diff --git a/cmd/helm/testdata/output/uninstall-keep-history.txt b/pkg/cmd/testdata/output/uninstall-keep-history.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-keep-history.txt rename to pkg/cmd/testdata/output/uninstall-keep-history.txt diff --git a/cmd/helm/testdata/output/uninstall-multiple.txt b/pkg/cmd/testdata/output/uninstall-multiple.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-multiple.txt rename to pkg/cmd/testdata/output/uninstall-multiple.txt diff --git a/cmd/helm/testdata/output/uninstall-no-args.txt b/pkg/cmd/testdata/output/uninstall-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-no-args.txt rename to pkg/cmd/testdata/output/uninstall-no-args.txt diff --git a/cmd/helm/testdata/output/uninstall-no-hooks.txt b/pkg/cmd/testdata/output/uninstall-no-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-no-hooks.txt rename to pkg/cmd/testdata/output/uninstall-no-hooks.txt diff --git a/cmd/helm/testdata/output/uninstall-timeout.txt b/pkg/cmd/testdata/output/uninstall-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-timeout.txt rename to pkg/cmd/testdata/output/uninstall-timeout.txt diff --git a/cmd/helm/testdata/output/uninstall-wait.txt b/pkg/cmd/testdata/output/uninstall-wait.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-wait.txt rename to pkg/cmd/testdata/output/uninstall-wait.txt diff --git a/cmd/helm/testdata/output/uninstall.txt b/pkg/cmd/testdata/output/uninstall.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall.txt rename to pkg/cmd/testdata/output/uninstall.txt diff --git a/cmd/helm/testdata/output/upgrade-and-take-ownership.txt b/pkg/cmd/testdata/output/upgrade-and-take-ownership.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-and-take-ownership.txt rename to pkg/cmd/testdata/output/upgrade-and-take-ownership.txt diff --git a/cmd/helm/testdata/output/upgrade-uninstalled-with-keep-history.txt b/pkg/cmd/testdata/output/upgrade-uninstalled-with-keep-history.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-uninstalled-with-keep-history.txt rename to pkg/cmd/testdata/output/upgrade-uninstalled-with-keep-history.txt diff --git a/cmd/helm/testdata/output/upgrade-with-bad-dependencies.txt b/pkg/cmd/testdata/output/upgrade-with-bad-dependencies.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-bad-dependencies.txt rename to pkg/cmd/testdata/output/upgrade-with-bad-dependencies.txt diff --git a/cmd/helm/testdata/output/upgrade-with-bad-or-missing-existing-release.txt b/pkg/cmd/testdata/output/upgrade-with-bad-or-missing-existing-release.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-bad-or-missing-existing-release.txt rename to pkg/cmd/testdata/output/upgrade-with-bad-or-missing-existing-release.txt diff --git a/cmd/helm/testdata/output/upgrade-with-dependency-update.txt b/pkg/cmd/testdata/output/upgrade-with-dependency-update.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-dependency-update.txt rename to pkg/cmd/testdata/output/upgrade-with-dependency-update.txt diff --git a/cmd/helm/testdata/output/upgrade-with-install-timeout.txt b/pkg/cmd/testdata/output/upgrade-with-install-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-install-timeout.txt rename to pkg/cmd/testdata/output/upgrade-with-install-timeout.txt diff --git a/cmd/helm/testdata/output/upgrade-with-install.txt b/pkg/cmd/testdata/output/upgrade-with-install.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-install.txt rename to pkg/cmd/testdata/output/upgrade-with-install.txt diff --git a/cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt b/pkg/cmd/testdata/output/upgrade-with-missing-dependencies.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt rename to pkg/cmd/testdata/output/upgrade-with-missing-dependencies.txt diff --git a/cmd/helm/testdata/output/upgrade-with-pending-install.txt b/pkg/cmd/testdata/output/upgrade-with-pending-install.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-pending-install.txt rename to pkg/cmd/testdata/output/upgrade-with-pending-install.txt diff --git a/cmd/helm/testdata/output/upgrade-with-reset-values.txt b/pkg/cmd/testdata/output/upgrade-with-reset-values.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-reset-values.txt rename to pkg/cmd/testdata/output/upgrade-with-reset-values.txt diff --git a/cmd/helm/testdata/output/upgrade-with-reset-values2.txt b/pkg/cmd/testdata/output/upgrade-with-reset-values2.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-reset-values2.txt rename to pkg/cmd/testdata/output/upgrade-with-reset-values2.txt diff --git a/cmd/helm/testdata/output/upgrade-with-timeout.txt b/pkg/cmd/testdata/output/upgrade-with-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-timeout.txt rename to pkg/cmd/testdata/output/upgrade-with-timeout.txt diff --git a/cmd/helm/testdata/output/upgrade-with-wait-for-jobs.txt b/pkg/cmd/testdata/output/upgrade-with-wait-for-jobs.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-wait-for-jobs.txt rename to pkg/cmd/testdata/output/upgrade-with-wait-for-jobs.txt diff --git a/cmd/helm/testdata/output/upgrade-with-wait.txt b/pkg/cmd/testdata/output/upgrade-with-wait.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-wait.txt rename to pkg/cmd/testdata/output/upgrade-with-wait.txt diff --git a/cmd/helm/testdata/output/upgrade.txt b/pkg/cmd/testdata/output/upgrade.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade.txt rename to pkg/cmd/testdata/output/upgrade.txt diff --git a/cmd/helm/testdata/output/values.json b/pkg/cmd/testdata/output/values.json similarity index 100% rename from cmd/helm/testdata/output/values.json rename to pkg/cmd/testdata/output/values.json diff --git a/cmd/helm/testdata/output/values.yaml b/pkg/cmd/testdata/output/values.yaml similarity index 100% rename from cmd/helm/testdata/output/values.yaml rename to pkg/cmd/testdata/output/values.yaml diff --git a/cmd/helm/testdata/output/version-client-shorthand.txt b/pkg/cmd/testdata/output/version-client-shorthand.txt similarity index 100% rename from cmd/helm/testdata/output/version-client-shorthand.txt rename to pkg/cmd/testdata/output/version-client-shorthand.txt diff --git a/cmd/helm/testdata/output/version-client.txt b/pkg/cmd/testdata/output/version-client.txt similarity index 100% rename from cmd/helm/testdata/output/version-client.txt rename to pkg/cmd/testdata/output/version-client.txt diff --git a/cmd/helm/testdata/output/version-comp.txt b/pkg/cmd/testdata/output/version-comp.txt similarity index 100% rename from cmd/helm/testdata/output/version-comp.txt rename to pkg/cmd/testdata/output/version-comp.txt diff --git a/cmd/helm/testdata/output/version-invalid-comp.txt b/pkg/cmd/testdata/output/version-invalid-comp.txt similarity index 100% rename from cmd/helm/testdata/output/version-invalid-comp.txt rename to pkg/cmd/testdata/output/version-invalid-comp.txt diff --git a/cmd/helm/testdata/output/version-short.txt b/pkg/cmd/testdata/output/version-short.txt similarity index 100% rename from cmd/helm/testdata/output/version-short.txt rename to pkg/cmd/testdata/output/version-short.txt diff --git a/cmd/helm/testdata/output/version-template.txt b/pkg/cmd/testdata/output/version-template.txt similarity index 100% rename from cmd/helm/testdata/output/version-template.txt rename to pkg/cmd/testdata/output/version-template.txt diff --git a/cmd/helm/testdata/output/version.txt b/pkg/cmd/testdata/output/version.txt similarity index 100% rename from cmd/helm/testdata/output/version.txt rename to pkg/cmd/testdata/output/version.txt diff --git a/cmd/helm/testdata/password b/pkg/cmd/testdata/password similarity index 100% rename from cmd/helm/testdata/password rename to pkg/cmd/testdata/password diff --git a/cmd/helm/testdata/plugins.yaml b/pkg/cmd/testdata/plugins.yaml similarity index 100% rename from cmd/helm/testdata/plugins.yaml rename to pkg/cmd/testdata/plugins.yaml diff --git a/cmd/helm/testdata/repositories.yaml b/pkg/cmd/testdata/repositories.yaml similarity index 100% rename from cmd/helm/testdata/repositories.yaml rename to pkg/cmd/testdata/repositories.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/Chart.yaml b/pkg/cmd/testdata/testcharts/alpine/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/Chart.yaml rename to pkg/cmd/testdata/testcharts/alpine/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/README.md b/pkg/cmd/testdata/testcharts/alpine/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/README.md rename to pkg/cmd/testdata/testcharts/alpine/README.md diff --git a/cmd/helm/testdata/testcharts/alpine/extra_values.yaml b/pkg/cmd/testdata/testcharts/alpine/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/extra_values.yaml rename to pkg/cmd/testdata/testcharts/alpine/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/more_values.yaml b/pkg/cmd/testdata/testcharts/alpine/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/more_values.yaml rename to pkg/cmd/testdata/testcharts/alpine/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/alpine/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/alpine/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/values.yaml b/pkg/cmd/testdata/testcharts/alpine/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/values.yaml rename to pkg/cmd/testdata/testcharts/alpine/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/.helmignore b/pkg/cmd/testdata/testcharts/chart-bad-requirements/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/.helmignore rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore b/pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/README.md b/pkg/cmd/testdata/testcharts/chart-bad-type/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/README.md rename to pkg/cmd/testdata/testcharts/chart-bad-type/README.md diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/extra_values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/extra_values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/more_values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/more_values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/.helmignore b/pkg/cmd/testdata/testcharts/chart-missing-deps/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/.helmignore rename to pkg/cmd/testdata/testcharts/chart-missing-deps/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore b/pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore rename to pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/values.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/values.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-deprecated-api/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-deprecated-api/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-deprecated-api/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-deprecated-api/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml b/pkg/cmd/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml rename to pkg/cmd/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-deprecated-api/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-deprecated-api/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-deprecated-api/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-deprecated-api/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/service.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-only-crds/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-only-crds/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-only-crds/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-only-crds/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-only-crds/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-only-crds/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-only-crds/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-only-crds/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml b/pkg/cmd/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml rename to pkg/cmd/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/extra-values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/extra-values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/extra-values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/extra-values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-secret/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-secret/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-secret/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-secret/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-secret/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/chart-with-secret/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-secret/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/chart-with-secret/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-secret/templates/secret.yaml b/pkg/cmd/testdata/testcharts/chart-with-secret/templates/secret.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-secret/templates/secret.yaml rename to pkg/cmd/testdata/testcharts/chart-with-secret/templates/secret.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.lock b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.lock similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.lock rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.lock diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz b/pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tar.gz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz rename to pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tar.gz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.2.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-0.2.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.2.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-0.2.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.3.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-0.3.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.3.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-0.3.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/deprecated/Chart.yaml b/pkg/cmd/testdata/testcharts/deprecated/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/deprecated/Chart.yaml rename to pkg/cmd/testdata/testcharts/deprecated/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/deprecated/README.md b/pkg/cmd/testdata/testcharts/deprecated/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/deprecated/README.md rename to pkg/cmd/testdata/testcharts/deprecated/README.md diff --git a/cmd/helm/testdata/testcharts/empty/Chart.yaml b/pkg/cmd/testdata/testcharts/empty/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/Chart.yaml rename to pkg/cmd/testdata/testcharts/empty/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/empty/README.md b/pkg/cmd/testdata/testcharts/empty/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/empty/README.md rename to pkg/cmd/testdata/testcharts/empty/README.md diff --git a/cmd/helm/testdata/testcharts/empty/templates/empty.yaml b/pkg/cmd/testdata/testcharts/empty/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/empty/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/empty/values.yaml b/pkg/cmd/testdata/testcharts/empty/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/values.yaml rename to pkg/cmd/testdata/testcharts/empty/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/.helmignore b/pkg/cmd/testdata/testcharts/issue-7233/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/.helmignore rename to pkg/cmd/testdata/testcharts/issue-7233/.helmignore diff --git a/cmd/helm/testdata/testcharts/issue-7233/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-7233/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/requirements.lock b/pkg/cmd/testdata/testcharts/issue-7233/requirements.lock similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/requirements.lock rename to pkg/cmd/testdata/testcharts/issue-7233/requirements.lock diff --git a/cmd/helm/testdata/testcharts/issue-7233/requirements.yaml b/pkg/cmd/testdata/testcharts/issue-7233/requirements.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/requirements.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/requirements.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/issue-7233/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/values.yaml b/pkg/cmd/testdata/testcharts/issue-7233/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/values.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-9027/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/charts/subchart/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/charts/subchart/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/templates/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/templates/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/templates/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/templates/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-totoml/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-totoml/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-totoml/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-totoml/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-totoml/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/issue-totoml/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-totoml/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/issue-totoml/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/issue-totoml/values.yaml b/pkg/cmd/testdata/testcharts/issue-totoml/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-totoml/values.yaml rename to pkg/cmd/testdata/testcharts/issue-totoml/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/Chart.yaml b/pkg/cmd/testdata/testcharts/issue1979/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue1979/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/README.md b/pkg/cmd/testdata/testcharts/issue1979/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/README.md rename to pkg/cmd/testdata/testcharts/issue1979/README.md diff --git a/cmd/helm/testdata/testcharts/issue1979/extra_values.yaml b/pkg/cmd/testdata/testcharts/issue1979/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/extra_values.yaml rename to pkg/cmd/testdata/testcharts/issue1979/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/more_values.yaml b/pkg/cmd/testdata/testcharts/issue1979/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/more_values.yaml rename to pkg/cmd/testdata/testcharts/issue1979/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/issue1979/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/issue1979/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/values.yaml b/pkg/cmd/testdata/testcharts/issue1979/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/values.yaml rename to pkg/cmd/testdata/testcharts/issue1979/values.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/.helmignore b/pkg/cmd/testdata/testcharts/lib-chart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/.helmignore rename to pkg/cmd/testdata/testcharts/lib-chart/.helmignore diff --git a/cmd/helm/testdata/testcharts/lib-chart/Chart.yaml b/pkg/cmd/testdata/testcharts/lib-chart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/Chart.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/README.md b/pkg/cmd/testdata/testcharts/lib-chart/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/README.md rename to pkg/cmd/testdata/testcharts/lib-chart/README.md diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_chartref.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_chartref.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_chartref.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_chartref.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_configmap.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_configmap.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_configmap.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_container.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_container.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_container.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_container.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_deployment.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_deployment.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_deployment.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_envvar.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_envvar.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_envvar.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_envvar.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_fullname.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_fullname.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_fullname.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_fullname.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_ingress.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_ingress.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_ingress.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_metadata.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_name.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_name.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_name.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_name.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_secret.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_secret.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_secret.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_secret.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_service.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_service.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_service.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_util.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_util.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_util.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_util.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_volume.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_volume.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_volume.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_volume.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/values.yaml b/pkg/cmd/testdata/testcharts/lib-chart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/values.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/values.yaml diff --git a/cmd/helm/testdata/testcharts/object-order/Chart.yaml b/pkg/cmd/testdata/testcharts/object-order/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/Chart.yaml rename to pkg/cmd/testdata/testcharts/object-order/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/object-order/templates/01-a.yml b/pkg/cmd/testdata/testcharts/object-order/templates/01-a.yml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/templates/01-a.yml rename to pkg/cmd/testdata/testcharts/object-order/templates/01-a.yml diff --git a/cmd/helm/testdata/testcharts/object-order/templates/02-b.yml b/pkg/cmd/testdata/testcharts/object-order/templates/02-b.yml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/templates/02-b.yml rename to pkg/cmd/testdata/testcharts/object-order/templates/02-b.yml diff --git a/cmd/helm/testdata/testcharts/object-order/values.yaml b/pkg/cmd/testdata/testcharts/object-order/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/values.yaml rename to pkg/cmd/testdata/testcharts/object-order/values.yaml diff --git a/cmd/helm/testdata/testcharts/oci-dependent-chart-0.1.0.tgz b/pkg/cmd/testdata/testcharts/oci-dependent-chart-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/oci-dependent-chart-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/oci-dependent-chart-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz b/pkg/cmd/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz rename to pkg/cmd/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest-0.1.0.tgz b/pkg/cmd/testdata/testcharts/reqtest-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/reqtest-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest/.helmignore b/pkg/cmd/testdata/testcharts/reqtest/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/.helmignore rename to pkg/cmd/testdata/testcharts/reqtest/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/Chart.lock b/pkg/cmd/testdata/testcharts/reqtest/Chart.lock similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/Chart.lock rename to pkg/cmd/testdata/testcharts/reqtest/Chart.lock diff --git a/cmd/helm/testdata/testcharts/reqtest/Chart.yaml b/pkg/cmd/testdata/testcharts/reqtest/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/Chart.yaml rename to pkg/cmd/testdata/testcharts/reqtest/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest/values.yaml b/pkg/cmd/testdata/testcharts/reqtest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/values.yaml rename to pkg/cmd/testdata/testcharts/reqtest/values.yaml diff --git a/cmd/helm/testdata/testcharts/signtest-0.1.0.tgz b/pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/signtest-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/signtest-0.1.0.tgz.prov b/pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz.prov similarity index 100% rename from cmd/helm/testdata/testcharts/signtest-0.1.0.tgz.prov rename to pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz.prov diff --git a/cmd/helm/testdata/testcharts/signtest/.helmignore b/pkg/cmd/testdata/testcharts/signtest/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/.helmignore rename to pkg/cmd/testdata/testcharts/signtest/.helmignore diff --git a/cmd/helm/testdata/testcharts/signtest/Chart.yaml b/pkg/cmd/testdata/testcharts/signtest/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/Chart.yaml rename to pkg/cmd/testdata/testcharts/signtest/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/Chart.yaml b/pkg/cmd/testdata/testcharts/signtest/alpine/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/Chart.yaml rename to pkg/cmd/testdata/testcharts/signtest/alpine/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/README.md b/pkg/cmd/testdata/testcharts/signtest/alpine/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/README.md rename to pkg/cmd/testdata/testcharts/signtest/alpine/README.md diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/values.yaml b/pkg/cmd/testdata/testcharts/signtest/alpine/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/values.yaml rename to pkg/cmd/testdata/testcharts/signtest/alpine/values.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/templates/pod.yaml b/pkg/cmd/testdata/testcharts/signtest/templates/pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/templates/pod.yaml rename to pkg/cmd/testdata/testcharts/signtest/templates/pod.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/values.yaml b/pkg/cmd/testdata/testcharts/signtest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/values.yaml rename to pkg/cmd/testdata/testcharts/signtest/values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartA/Chart.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartA/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartA/Chart.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartA/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartA/values.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartA/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartA/values.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartA/values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartB/Chart.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartB/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartB/Chart.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartB/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartB/values.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartB/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartB/values.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartB/values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/crds/crdA.yaml b/pkg/cmd/testdata/testcharts/subchart/crds/crdA.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/crds/crdA.yaml rename to pkg/cmd/testdata/testcharts/subchart/crds/crdA.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/extra_values.yaml b/pkg/cmd/testdata/testcharts/subchart/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/extra_values.yaml rename to pkg/cmd/testdata/testcharts/subchart/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/subchart/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/subchart/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/subchart/templates/service.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/service.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/configmap.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/configmap.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/role.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/role.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/role.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/role.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/tests/test-config.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/tests/test-config.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/tests/test-config.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/tests/test-config.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/tests/test-nothing.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/tests/test-nothing.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/tests/test-nothing.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/tests/test-nothing.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/values.yaml b/pkg/cmd/testdata/testcharts/subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/values.yaml rename to pkg/cmd/testdata/testcharts/subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/upgradetest/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/upgradetest/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/upgradetest/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/upgradetest/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/upgradetest/values.yaml b/pkg/cmd/testdata/testcharts/upgradetest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/upgradetest/values.yaml rename to pkg/cmd/testdata/testcharts/upgradetest/values.yaml diff --git a/cmd/helm/testdata/testplugin/plugin.yaml b/pkg/cmd/testdata/testplugin/plugin.yaml similarity index 100% rename from cmd/helm/testdata/testplugin/plugin.yaml rename to pkg/cmd/testdata/testplugin/plugin.yaml diff --git a/cmd/helm/testdata/testserver/index.yaml b/pkg/cmd/testdata/testserver/index.yaml similarity index 100% rename from cmd/helm/testdata/testserver/index.yaml rename to pkg/cmd/testdata/testserver/index.yaml diff --git a/cmd/helm/testdata/testserver/repository/repositories.yaml b/pkg/cmd/testdata/testserver/repository/repositories.yaml similarity index 100% rename from cmd/helm/testdata/testserver/repository/repositories.yaml rename to pkg/cmd/testdata/testserver/repository/repositories.yaml diff --git a/cmd/helm/uninstall.go b/pkg/cmd/uninstall.go similarity index 98% rename from cmd/helm/uninstall.go rename to pkg/cmd/uninstall.go index 3504fd322..3a86cc598 100644 --- a/cmd/helm/uninstall.go +++ b/pkg/cmd/uninstall.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const uninstallDesc = ` diff --git a/cmd/helm/uninstall_test.go b/pkg/cmd/uninstall_test.go similarity index 99% rename from cmd/helm/uninstall_test.go rename to pkg/cmd/uninstall_test.go index 852823591..1123f449b 100644 --- a/cmd/helm/uninstall_test.go +++ b/pkg/cmd/uninstall_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/upgrade.go b/pkg/cmd/upgrade.go similarity index 99% rename from cmd/helm/upgrade.go rename to pkg/cmd/upgrade.go index 9a78ce746..74d12ac40 100644 --- a/cmd/helm/upgrade.go +++ b/pkg/cmd/upgrade.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "context" @@ -29,11 +29,11 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" release "helm.sh/helm/v4/pkg/release/v1" @@ -173,7 +173,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } @@ -225,7 +225,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } if ch.Metadata.Deprecated { - warning("This chart is deprecated") + Warning("This chart is deprecated") } // Create context and prepare the handle of SIGTERM diff --git a/cmd/helm/upgrade_test.go b/pkg/cmd/upgrade_test.go similarity index 99% rename from cmd/helm/upgrade_test.go rename to pkg/cmd/upgrade_test.go index 9b414c90a..8a840f149 100644 --- a/cmd/helm/upgrade_test.go +++ b/pkg/cmd/upgrade_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/verify.go b/pkg/cmd/verify.go similarity index 97% rename from cmd/helm/verify.go rename to pkg/cmd/verify.go index 197a164b6..50f1ea914 100644 --- a/cmd/helm/verify.go +++ b/pkg/cmd/verify.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -21,8 +21,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const verifyDesc = ` diff --git a/cmd/helm/verify_test.go b/pkg/cmd/verify_test.go similarity index 99% rename from cmd/helm/verify_test.go rename to pkg/cmd/verify_test.go index 23b793557..ae373afd2 100644 --- a/cmd/helm/verify_test.go +++ b/pkg/cmd/verify_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/version.go b/pkg/cmd/version.go similarity index 98% rename from cmd/helm/version.go rename to pkg/cmd/version.go index 030ce2dcd..0211716fe 100644 --- a/cmd/helm/version.go +++ b/pkg/cmd/version.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/internal/version" + "helm.sh/helm/v4/pkg/cmd/require" ) const versionDesc = ` diff --git a/cmd/helm/version_test.go b/pkg/cmd/version_test.go similarity index 98% rename from cmd/helm/version_test.go rename to pkg/cmd/version_test.go index aa3cbfb7d..c06c72309 100644 --- a/cmd/helm/version_test.go +++ b/pkg/cmd/version_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing"