From 362114d37e080c66a00f2a498bc016bb9d0013cd Mon Sep 17 00:00:00 2001 From: Denis O Date: Fri, 19 May 2023 17:03:14 +0000 Subject: [PATCH 1/8] Add option to build dependencies in case of install, upgrade and template render --- modules/helm/install.go | 6 ++++++ modules/helm/options.go | 21 +++++++++++---------- modules/helm/template.go | 6 ++++-- modules/helm/upgrade.go | 6 ++++++ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/modules/helm/install.go b/modules/helm/install.go index e7272eb79..e05c00048 100644 --- a/modules/helm/install.go +++ b/modules/helm/install.go @@ -28,6 +28,12 @@ func InstallE(t testing.TestingT, options *Options, chart string, releaseName st chart = absChartDir } + // build chart dependencies + if options.BuildDependencies { + if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chart); err != nil { + return errors.WithStackTrace(err) + } + } // Now call out to helm install to install the charts with the provided options // Declare err here so that we can update args later var err error diff --git a/modules/helm/options.go b/modules/helm/options.go index 9e2495db3..e6cd50cd9 100644 --- a/modules/helm/options.go +++ b/modules/helm/options.go @@ -6,14 +6,15 @@ import ( ) type Options struct { - ValuesFiles []string // List of values files to render. - SetValues map[string]string // Values that should be set via the command line. - SetStrValues map[string]string // Values that should be set via the command line explicitly as `string` types. - SetFiles map[string]string // Values that should be set from a file. These should be file paths. Use to avoid logging secrets. - KubectlOptions *k8s.KubectlOptions // KubectlOptions to control how to authenticate to kubernetes cluster. `nil` => use defaults. - HomePath string // The path to the helm home to use when calling out to helm. Empty string means use default ($HOME/.helm). - EnvVars map[string]string // Environment variables to set when running helm - Version string // Version of chart - Logger *logger.Logger // Set a non-default logger that should be used. See the logger package for more info. Use logger.Discard to not print the output while executing the command. - ExtraArgs map[string][]string // Extra arguments to pass to the helm install/upgrade/rollback/delete and helm repo add commands. The key signals the command (e.g., install) while the values are the extra arguments to pass through. + ValuesFiles []string // List of values files to render. + SetValues map[string]string // Values that should be set via the command line. + SetStrValues map[string]string // Values that should be set via the command line explicitly as `string` types. + SetFiles map[string]string // Values that should be set from a file. These should be file paths. Use to avoid logging secrets. + KubectlOptions *k8s.KubectlOptions // KubectlOptions to control how to authenticate to kubernetes cluster. `nil` => use defaults. + HomePath string // The path to the helm home to use when calling out to helm. Empty string means use default ($HOME/.helm). + EnvVars map[string]string // Environment variables to set when running helm + Version string // Version of chart + Logger *logger.Logger // Set a non-default logger that should be used. See the logger package for more info. Use logger.Discard to not print the output while executing the command. + ExtraArgs map[string][]string // Extra arguments to pass to the helm install/upgrade/rollback/delete and helm repo add commands. The key signals the command (e.g., install) while the values are the extra arguments to pass through. + BuildDependencies bool // If true, run helm dependency build before template rendering and installing the chart } diff --git a/modules/helm/template.go b/modules/helm/template.go index b70b04dea..f6b3624cf 100644 --- a/modules/helm/template.go +++ b/modules/helm/template.go @@ -35,8 +35,10 @@ func RenderTemplateE(t testing.TestingT, options *Options, chartDir string, rele } // check chart dependencies - if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chartDir); err != nil { - return "", errors.WithStackTrace(err) + if options.BuildDependencies { + if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chartDir); err != nil { + return "", errors.WithStackTrace(err) + } } // Now construct the args diff --git a/modules/helm/upgrade.go b/modules/helm/upgrade.go index d44aa45f2..13ccb3ae6 100644 --- a/modules/helm/upgrade.go +++ b/modules/helm/upgrade.go @@ -27,6 +27,12 @@ func UpgradeE(t testing.TestingT, options *Options, chart string, releaseName st chart = absChartDir } + // build chart dependencies + if options.BuildDependencies { + if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chart); err != nil { + return errors.WithStackTrace(err) + } + } var err error args := []string{} if options.ExtraArgs != nil { From 686704fb8f22b794f1ba2c184ca6d8d7a30abfdd Mon Sep 17 00:00:00 2001 From: Denis O Date: Fri, 19 May 2023 19:37:28 +0000 Subject: [PATCH 2/8] Tests update --- test/helm_dependency_example_template_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/helm_dependency_example_template_test.go b/test/helm_dependency_example_template_test.go index 73125579b..d751c2644 100644 --- a/test/helm_dependency_example_template_test.go +++ b/test/helm_dependency_example_template_test.go @@ -57,7 +57,8 @@ func TestHelmDependencyExampleTemplateRenderedDeployment(t *testing.T) { "basic.containerImageRepo": "nginx", "basic.containerImageTag": "1.15.8", }, - KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), + KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), + BuildDependencies: true, } testCases := []struct { From a43b413527fa4911d7772961aef604bfc3d0c5e0 Mon Sep 17 00:00:00 2001 From: Denis O Date: Fri, 19 May 2023 21:20:13 +0000 Subject: [PATCH 3/8] Add option to skip dependencies building --- modules/helm/install.go | 2 +- modules/helm/install_test.go | 50 ++++++++++++++++++ modules/helm/options.go | 22 ++++---- modules/helm/template.go | 2 +- modules/helm/upgrade.go | 2 +- modules/helm/upgrade_test.go | 51 +++++++++++++++++++ test/helm_dependency_example_template_test.go | 3 +- 7 files changed, 116 insertions(+), 16 deletions(-) diff --git a/modules/helm/install.go b/modules/helm/install.go index e05c00048..8d42316d1 100644 --- a/modules/helm/install.go +++ b/modules/helm/install.go @@ -29,7 +29,7 @@ func InstallE(t testing.TestingT, options *Options, chart string, releaseName st } // build chart dependencies - if options.BuildDependencies { + if !options.SkipBuildDependencies { if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chart); err != nil { return errors.WithStackTrace(err) } diff --git a/modules/helm/install_test.go b/modules/helm/install_test.go index d0bc6f79c..926b18be3 100644 --- a/modules/helm/install_test.go +++ b/modules/helm/install_test.go @@ -11,10 +11,13 @@ package helm import ( "crypto/tls" "fmt" + "path/filepath" "strings" "testing" "time" + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" http_helper "github.com/gruntwork-io/terratest/modules/http-helper" @@ -99,6 +102,53 @@ func TestRemoteChartInstall(t *testing.T) { ) } +// Test deployment of helm chart with dependencies. +func TestHelmDependencyInstall(t *testing.T) { + t.Parallel() + + // Path to the helm chart with dependencies which we will test + helmChartPath, err := filepath.Abs("../../examples/helm-dependency-example") + require.NoError(t, err) + + // Custom namespace name. + namespaceName := fmt.Sprintf("helm-dependency-example-%s", strings.ToLower(random.UniqueId())) + + // Setup the kubectl config and context. Here we choose to use the defaults, which is: + // - HOME/.kube/config for the kubectl config file + // - Current context of the kubectl config file + kubectlOptions := k8s.NewKubectlOptions("", "", namespaceName) + + k8s.CreateNamespace(t, kubectlOptions, namespaceName) + defer k8s.DeleteNamespace(t, kubectlOptions, namespaceName) + + // Helm chart deployment options. + options := &Options{ + KubectlOptions: kubectlOptions, + SetValues: map[string]string{ + "containerImageRepo": "nginx", + "containerImageTag": "1.15.8", + "basic.containerImageRepo": "nginx", + "basic.containerImageTag": "1.15.8", + }, + } + // We generate a unique release name so that we can refer to after deployment. + // By doing so, we can schedule the delete call here so that at the end of the test, we run + // `helm delete RELEASE_NAME` to clean up any resources that were created. + releaseName := fmt.Sprintf( + "helm-dependency-example-%s", + strings.ToLower(random.UniqueId()), + ) + defer Delete(t, options, releaseName, true) + + // Deploy the chart using `helm install`. + err = InstallE(t, options, helmChartPath, releaseName) + assert.NoError(t, err) + + // Verify that Kubernetes service is available after helm chart deployment. + _, err = k8s.GetServiceE(t, kubectlOptions, releaseName) + assert.NoError(t, err) +} + func waitForRemoteChartPods(t *testing.T, kubectlOptions *k8s.KubectlOptions, releaseName string, podCount int) { // Get pod and wait for it to be avaialable // To get the pod, we need to filter it using the labels that the helm chart creates diff --git a/modules/helm/options.go b/modules/helm/options.go index e6cd50cd9..9c1916dd9 100644 --- a/modules/helm/options.go +++ b/modules/helm/options.go @@ -6,15 +6,15 @@ import ( ) type Options struct { - ValuesFiles []string // List of values files to render. - SetValues map[string]string // Values that should be set via the command line. - SetStrValues map[string]string // Values that should be set via the command line explicitly as `string` types. - SetFiles map[string]string // Values that should be set from a file. These should be file paths. Use to avoid logging secrets. - KubectlOptions *k8s.KubectlOptions // KubectlOptions to control how to authenticate to kubernetes cluster. `nil` => use defaults. - HomePath string // The path to the helm home to use when calling out to helm. Empty string means use default ($HOME/.helm). - EnvVars map[string]string // Environment variables to set when running helm - Version string // Version of chart - Logger *logger.Logger // Set a non-default logger that should be used. See the logger package for more info. Use logger.Discard to not print the output while executing the command. - ExtraArgs map[string][]string // Extra arguments to pass to the helm install/upgrade/rollback/delete and helm repo add commands. The key signals the command (e.g., install) while the values are the extra arguments to pass through. - BuildDependencies bool // If true, run helm dependency build before template rendering and installing the chart + ValuesFiles []string // List of values files to render. + SetValues map[string]string // Values that should be set via the command line. + SetStrValues map[string]string // Values that should be set via the command line explicitly as `string` types. + SetFiles map[string]string // Values that should be set from a file. These should be file paths. Use to avoid logging secrets. + KubectlOptions *k8s.KubectlOptions // KubectlOptions to control how to authenticate to kubernetes cluster. `nil` => use defaults. + HomePath string // The path to the helm home to use when calling out to helm. Empty string means use default ($HOME/.helm). + EnvVars map[string]string // Environment variables to set when running helm + Version string // Version of chart + Logger *logger.Logger // Set a non-default logger that should be used. See the logger package for more info. Use logger.Discard to not print the output while executing the command. + ExtraArgs map[string][]string // Extra arguments to pass to the helm install/upgrade/rollback/delete and helm repo add commands. The key signals the command (e.g., install) while the values are the extra arguments to pass through. + SkipBuildDependencies bool // If true, helm chart dependencies will not be built. } diff --git a/modules/helm/template.go b/modules/helm/template.go index f6b3624cf..e009685de 100644 --- a/modules/helm/template.go +++ b/modules/helm/template.go @@ -35,7 +35,7 @@ func RenderTemplateE(t testing.TestingT, options *Options, chartDir string, rele } // check chart dependencies - if options.BuildDependencies { + if !options.SkipBuildDependencies { if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chartDir); err != nil { return "", errors.WithStackTrace(err) } diff --git a/modules/helm/upgrade.go b/modules/helm/upgrade.go index 13ccb3ae6..07a2a75a6 100644 --- a/modules/helm/upgrade.go +++ b/modules/helm/upgrade.go @@ -28,7 +28,7 @@ func UpgradeE(t testing.TestingT, options *Options, chart string, releaseName st } // build chart dependencies - if options.BuildDependencies { + if !options.SkipBuildDependencies { if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chart); err != nil { return errors.WithStackTrace(err) } diff --git a/modules/helm/upgrade_test.go b/modules/helm/upgrade_test.go index afef4f7c4..688c08b5e 100644 --- a/modules/helm/upgrade_test.go +++ b/modules/helm/upgrade_test.go @@ -11,10 +11,14 @@ package helm import ( "crypto/tls" "fmt" + "path/filepath" "strings" "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + http_helper "github.com/gruntwork-io/terratest/modules/http-helper" "github.com/gruntwork-io/terratest/modules/k8s" "github.com/gruntwork-io/terratest/modules/random" @@ -95,3 +99,50 @@ func TestRemoteChartInstallUpgradeRollback(t *testing.T) { Rollback(t, options, releaseName, "") waitForRemoteChartPods(t, kubectlOptions, releaseName, 1) } + +// Test deployment of helm chart with dependencies. +func TestHelmDependencyUpgrade(t *testing.T) { + t.Parallel() + + // Path to the helm chart with dependencies which we will test + helmChartPath, err := filepath.Abs("../../examples/helm-dependency-example") + require.NoError(t, err) + + // Custom namespace name. + namespaceName := fmt.Sprintf("helm-dependency-example-%s", strings.ToLower(random.UniqueId())) + + // Setup the kubectl config and context. Here we choose to use the defaults, which is: + // - HOME/.kube/config for the kubectl config file + // - Current context of the kubectl config file + kubectlOptions := k8s.NewKubectlOptions("", "", namespaceName) + + k8s.CreateNamespace(t, kubectlOptions, namespaceName) + defer k8s.DeleteNamespace(t, kubectlOptions, namespaceName) + + // Helm chart deployment options. + options := &Options{ + KubectlOptions: kubectlOptions, + SetValues: map[string]string{ + "containerImageRepo": "nginx", + "containerImageTag": "1.15.8", + "basic.containerImageRepo": "nginx", + "basic.containerImageTag": "1.15.8", + }, + } + // We generate a unique release name so that we can refer to after deployment. + // By doing so, we can schedule the delete call here so that at the end of the test, we run + // `helm delete RELEASE_NAME` to clean up any resources that were created. + releaseName := fmt.Sprintf( + "helm-dependency-example-%s", + strings.ToLower(random.UniqueId()), + ) + defer Delete(t, options, releaseName, true) + + // Deploy the chart using `helm install`. + err = InstallE(t, options, helmChartPath, releaseName) + assert.NoError(t, err) + + // Verify that upgrade is working as expected. + err = UpgradeE(t, options, helmChartPath, releaseName) + assert.NoError(t, err) +} diff --git a/test/helm_dependency_example_template_test.go b/test/helm_dependency_example_template_test.go index d751c2644..73125579b 100644 --- a/test/helm_dependency_example_template_test.go +++ b/test/helm_dependency_example_template_test.go @@ -57,8 +57,7 @@ func TestHelmDependencyExampleTemplateRenderedDeployment(t *testing.T) { "basic.containerImageRepo": "nginx", "basic.containerImageTag": "1.15.8", }, - KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), - BuildDependencies: true, + KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), } testCases := []struct { From aac497946672bcec98ea4525e24611ea8fa97f12 Mon Sep 17 00:00:00 2001 From: Denis O Date: Fri, 19 May 2023 21:28:57 +0000 Subject: [PATCH 4/8] Updated description --- modules/helm/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/helm/options.go b/modules/helm/options.go index 9c1916dd9..bf879e6d2 100644 --- a/modules/helm/options.go +++ b/modules/helm/options.go @@ -16,5 +16,5 @@ type Options struct { Version string // Version of chart Logger *logger.Logger // Set a non-default logger that should be used. See the logger package for more info. Use logger.Discard to not print the output while executing the command. ExtraArgs map[string][]string // Extra arguments to pass to the helm install/upgrade/rollback/delete and helm repo add commands. The key signals the command (e.g., install) while the values are the extra arguments to pass through. - SkipBuildDependencies bool // If true, helm chart dependencies will not be built. + SkipBuildDependencies bool // If true, helm chart dependencies will not be built during template rendering, installation and upgrade of helm chart. } From 551f0c3f2dd83435b812059066f4a8f3421bc3c1 Mon Sep 17 00:00:00 2001 From: Denis O Date: Mon, 22 May 2023 11:25:48 +0000 Subject: [PATCH 5/8] Add step to copy temporary helm chart --- modules/helm/install_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/helm/install_test.go b/modules/helm/install_test.go index 926b18be3..1ce05bbe6 100644 --- a/modules/helm/install_test.go +++ b/modules/helm/install_test.go @@ -16,6 +16,8 @@ import ( "testing" "time" + "github.com/gruntwork-io/terratest/modules/files" + "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -110,6 +112,9 @@ func TestHelmDependencyInstall(t *testing.T) { helmChartPath, err := filepath.Abs("../../examples/helm-dependency-example") require.NoError(t, err) + helmChartPath, err = files.CopyTerraformFolderToTemp(helmChartPath, t.Name()) + require.NoError(t, err) + // Custom namespace name. namespaceName := fmt.Sprintf("helm-dependency-example-%s", strings.ToLower(random.UniqueId())) From 2aefaf93090dbfb8e4d2b776700fd627a0732522 Mon Sep 17 00:00:00 2001 From: Denis O Date: Mon, 22 May 2023 16:46:10 +0000 Subject: [PATCH 6/8] Update dependencies build test --- modules/helm/install.go | 2 +- modules/helm/options.go | 22 +++++++++---------- modules/helm/template.go | 2 +- modules/helm/upgrade.go | 2 +- test/helm_dependency_example_template_test.go | 3 ++- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/modules/helm/install.go b/modules/helm/install.go index 8d42316d1..e05c00048 100644 --- a/modules/helm/install.go +++ b/modules/helm/install.go @@ -29,7 +29,7 @@ func InstallE(t testing.TestingT, options *Options, chart string, releaseName st } // build chart dependencies - if !options.SkipBuildDependencies { + if options.BuildDependencies { if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chart); err != nil { return errors.WithStackTrace(err) } diff --git a/modules/helm/options.go b/modules/helm/options.go index bf879e6d2..0243a2f7b 100644 --- a/modules/helm/options.go +++ b/modules/helm/options.go @@ -6,15 +6,15 @@ import ( ) type Options struct { - ValuesFiles []string // List of values files to render. - SetValues map[string]string // Values that should be set via the command line. - SetStrValues map[string]string // Values that should be set via the command line explicitly as `string` types. - SetFiles map[string]string // Values that should be set from a file. These should be file paths. Use to avoid logging secrets. - KubectlOptions *k8s.KubectlOptions // KubectlOptions to control how to authenticate to kubernetes cluster. `nil` => use defaults. - HomePath string // The path to the helm home to use when calling out to helm. Empty string means use default ($HOME/.helm). - EnvVars map[string]string // Environment variables to set when running helm - Version string // Version of chart - Logger *logger.Logger // Set a non-default logger that should be used. See the logger package for more info. Use logger.Discard to not print the output while executing the command. - ExtraArgs map[string][]string // Extra arguments to pass to the helm install/upgrade/rollback/delete and helm repo add commands. The key signals the command (e.g., install) while the values are the extra arguments to pass through. - SkipBuildDependencies bool // If true, helm chart dependencies will not be built during template rendering, installation and upgrade of helm chart. + ValuesFiles []string // List of values files to render. + SetValues map[string]string // Values that should be set via the command line. + SetStrValues map[string]string // Values that should be set via the command line explicitly as `string` types. + SetFiles map[string]string // Values that should be set from a file. These should be file paths. Use to avoid logging secrets. + KubectlOptions *k8s.KubectlOptions // KubectlOptions to control how to authenticate to kubernetes cluster. `nil` => use defaults. + HomePath string // The path to the helm home to use when calling out to helm. Empty string means use default ($HOME/.helm). + EnvVars map[string]string // Environment variables to set when running helm + Version string // Version of chart + Logger *logger.Logger // Set a non-default logger that should be used. See the logger package for more info. Use logger.Discard to not print the output while executing the command. + ExtraArgs map[string][]string // Extra arguments to pass to the helm install/upgrade/rollback/delete and helm repo add commands. The key signals the command (e.g., install) while the values are the extra arguments to pass through. + BuildDependencies bool // If true, helm dependencies will be built before rendering template, installing or upgrade the chart. } diff --git a/modules/helm/template.go b/modules/helm/template.go index e009685de..f6b3624cf 100644 --- a/modules/helm/template.go +++ b/modules/helm/template.go @@ -35,7 +35,7 @@ func RenderTemplateE(t testing.TestingT, options *Options, chartDir string, rele } // check chart dependencies - if !options.SkipBuildDependencies { + if options.BuildDependencies { if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chartDir); err != nil { return "", errors.WithStackTrace(err) } diff --git a/modules/helm/upgrade.go b/modules/helm/upgrade.go index 07a2a75a6..13ccb3ae6 100644 --- a/modules/helm/upgrade.go +++ b/modules/helm/upgrade.go @@ -28,7 +28,7 @@ func UpgradeE(t testing.TestingT, options *Options, chart string, releaseName st } // build chart dependencies - if !options.SkipBuildDependencies { + if options.BuildDependencies { if _, err := RunHelmCommandAndGetOutputE(t, options, "dependency", "build", chart); err != nil { return errors.WithStackTrace(err) } diff --git a/test/helm_dependency_example_template_test.go b/test/helm_dependency_example_template_test.go index 73125579b..d751c2644 100644 --- a/test/helm_dependency_example_template_test.go +++ b/test/helm_dependency_example_template_test.go @@ -57,7 +57,8 @@ func TestHelmDependencyExampleTemplateRenderedDeployment(t *testing.T) { "basic.containerImageRepo": "nginx", "basic.containerImageTag": "1.15.8", }, - KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), + KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), + BuildDependencies: true, } testCases := []struct { From 728ca916de4d952f237d9671427d949967f2f359 Mon Sep 17 00:00:00 2001 From: Denis O Date: Mon, 22 May 2023 17:38:53 +0000 Subject: [PATCH 7/8] Update test for build dependencies --- modules/helm/install_test.go | 1 + modules/helm/upgrade_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/helm/install_test.go b/modules/helm/install_test.go index 1ce05bbe6..d891f4aa1 100644 --- a/modules/helm/install_test.go +++ b/modules/helm/install_test.go @@ -135,6 +135,7 @@ func TestHelmDependencyInstall(t *testing.T) { "basic.containerImageRepo": "nginx", "basic.containerImageTag": "1.15.8", }, + BuildDependencies: true, } // We generate a unique release name so that we can refer to after deployment. // By doing so, we can schedule the delete call here so that at the end of the test, we run diff --git a/modules/helm/upgrade_test.go b/modules/helm/upgrade_test.go index 688c08b5e..c4da70da9 100644 --- a/modules/helm/upgrade_test.go +++ b/modules/helm/upgrade_test.go @@ -128,6 +128,7 @@ func TestHelmDependencyUpgrade(t *testing.T) { "basic.containerImageRepo": "nginx", "basic.containerImageTag": "1.15.8", }, + BuildDependencies: true, } // We generate a unique release name so that we can refer to after deployment. // By doing so, we can schedule the delete call here so that at the end of the test, we run From 9c6c8512f7e38baabe3305b3dcd2276bf332e95d Mon Sep 17 00:00:00 2001 From: Denis O Date: Mon, 22 May 2023 18:44:39 +0000 Subject: [PATCH 8/8] Cleanup --- modules/helm/install_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/helm/install_test.go b/modules/helm/install_test.go index d891f4aa1..5c0c4bf5e 100644 --- a/modules/helm/install_test.go +++ b/modules/helm/install_test.go @@ -16,8 +16,6 @@ import ( "testing" "time" - "github.com/gruntwork-io/terratest/modules/files" - "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -112,9 +110,6 @@ func TestHelmDependencyInstall(t *testing.T) { helmChartPath, err := filepath.Abs("../../examples/helm-dependency-example") require.NoError(t, err) - helmChartPath, err = files.CopyTerraformFolderToTemp(helmChartPath, t.Name()) - require.NoError(t, err) - // Custom namespace name. namespaceName := fmt.Sprintf("helm-dependency-example-%s", strings.ToLower(random.UniqueId()))