refactor and fix conflicts

Signed-off-by: Alik Khilazhev <7482065+alikhil@users.noreply.github.com>
pull/30855/head
Alik Khilazhev 5 months ago
parent 848bc4cb89
commit f7b138ee8f
No known key found for this signature in database
GPG Key ID: 141EBCECAE009661

@ -26,7 +26,7 @@ import (
func TestPluginExitCode(t *testing.T) {
if os.Getenv("RUN_MAIN_FOR_TESTING") == "1" {
os.Args = []string{"helm", "exitwith", "2"}
// We DO call helm's main() here. So this looks like a normal `helm` process.
main()

@ -38,7 +38,6 @@ type Dependency struct {
Keyring string
SkipRefresh bool
ColumnWidth uint
BuildOrUpdateRecursive bool
Username string
Password string
CertFile string
@ -46,6 +45,7 @@ type Dependency struct {
CaFile string
InsecureSkipTLSverify bool
PlainHTTP bool
BuildOrUpdateRecursive bool
}
// NewDependency creates a new Dependency object with the given configuration.

@ -71,21 +71,17 @@ type Install struct {
ChartPathOptions
DryRunOption string
ClientOnly bool
Force bool
CreateNamespace bool
DryRun bool
DryRunOption string
// HideSecret can be set to true when DryRun is enabled in order to hide
// Kubernetes Secrets in the output. It cannot be used outside of DryRun.
HideSecret bool
WaitStrategy kube.WaitStrategy
HideNotes bool
SkipSchemaValidation bool
Labels map[string]string
ClientOnly bool
Force bool
CreateNamespace bool
DryRun bool
DisableHooks bool
Replace bool
Wait bool
WaitStrategy kube.WaitStrategy
WaitForJobs bool
Devel bool
DependencyUpdate bool
@ -100,8 +96,11 @@ type Install struct {
Atomic bool
SkipCRDs bool
SubNotes bool
HideNotes bool
SkipSchemaValidation bool
DisableOpenAPIValidation bool
IncludeCRDs bool
Labels map[string]string
// KubeVersion allows specifying a custom kubernetes version to use and
// APIVersions allows a manual set of supported API Versions to be passed
// (for things like templating). These are ignored if ClientOnly is false

@ -74,7 +74,7 @@ func newDependencyBuildCmd(out io.Writer) *cobra.Command {
if client.Verify {
man.Verify = downloader.VerifyIfPossible
}
err := man.Build(client.BuildOrUpdateRecursive)
err = man.Build(client.BuildOrUpdateRecursive)
if e, ok := err.(downloader.ErrRepoNotFound); ok {
return fmt.Errorf("%s. Please add the missing repos via 'helm repo add'", e.Error())
}

@ -147,7 +147,7 @@ func TestTemplateCmd(t *testing.T) {
},
{
name: "template with dependency update recursive",
preCmd: func(t *testing.T) error {
preCmd: func(_ *testing.T) error {
// We must reset the chart's dependency to actually
// exercise the ability to provision missing nested depencendies.
// If we don't do this, the chart will contain the `tgz` files from previous runs

Loading…
Cancel
Save