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) { func TestPluginExitCode(t *testing.T) {
if os.Getenv("RUN_MAIN_FOR_TESTING") == "1" { 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. // We DO call helm's main() here. So this looks like a normal `helm` process.
main() main()

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

@ -71,21 +71,17 @@ type Install struct {
ChartPathOptions ChartPathOptions
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 ClientOnly bool
Force bool Force bool
CreateNamespace bool CreateNamespace bool
DryRun 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
DisableHooks bool DisableHooks bool
Replace bool Replace bool
Wait bool WaitStrategy kube.WaitStrategy
WaitForJobs bool WaitForJobs bool
Devel bool Devel bool
DependencyUpdate bool DependencyUpdate bool
@ -100,8 +96,11 @@ type Install struct {
Atomic bool Atomic bool
SkipCRDs bool SkipCRDs bool
SubNotes bool SubNotes bool
HideNotes bool
SkipSchemaValidation bool
DisableOpenAPIValidation bool DisableOpenAPIValidation bool
IncludeCRDs bool IncludeCRDs bool
Labels map[string]string
// KubeVersion allows specifying a custom kubernetes version to use and // KubeVersion allows specifying a custom kubernetes version to use and
// APIVersions allows a manual set of supported API Versions to be passed // APIVersions allows a manual set of supported API Versions to be passed
// (for things like templating). These are ignored if ClientOnly is false // (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 { if client.Verify {
man.Verify = downloader.VerifyIfPossible man.Verify = downloader.VerifyIfPossible
} }
err := man.Build(client.BuildOrUpdateRecursive) err = man.Build(client.BuildOrUpdateRecursive)
if e, ok := err.(downloader.ErrRepoNotFound); ok { if e, ok := err.(downloader.ErrRepoNotFound); ok {
return fmt.Errorf("%s. Please add the missing repos via 'helm repo add'", e.Error()) 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", 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 // We must reset the chart's dependency to actually
// exercise the ability to provision missing nested depencendies. // exercise the ability to provision missing nested depencendies.
// If we don't do this, the chart will contain the `tgz` files from previous runs // If we don't do this, the chart will contain the `tgz` files from previous runs

Loading…
Cancel
Save