From 6f1851995762e9899cdcd2f9bbb17fe8e417f5a5 Mon Sep 17 00:00:00 2001 From: Jacob LeGrone Date: Thu, 5 Sep 2019 13:25:14 -0400 Subject: [PATCH] Remove test --cleanup flag Signed-off-by: Jacob LeGrone --- pkg/action/release_testing.go | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/pkg/action/release_testing.go b/pkg/action/release_testing.go index 0f594512b..37d0c3b7f 100644 --- a/pkg/action/release_testing.go +++ b/pkg/action/release_testing.go @@ -17,9 +17,6 @@ limitations under the License. package action import ( - "bytes" - "fmt" - "strings" "time" "github.com/pkg/errors" @@ -31,10 +28,8 @@ import ( // // It provides the implementation of 'helm test'. type ReleaseTesting struct { - cfg *Configuration - + cfg *Configuration Timeout time.Duration - Cleanup bool } // NewReleaseTesting creates a new ReleaseTesting object with the given configuration. @@ -65,23 +60,5 @@ func (r *ReleaseTesting) Run(name string) error { return err } - if r.Cleanup { - var manifestsToDelete strings.Builder - for _, h := range rel.Hooks { - for _, e := range h.Events { - if e == release.HookTest { - fmt.Fprintf(&manifestsToDelete, "\n---\n%s", h.Manifest) - } - } - } - hooks, err := r.cfg.KubeClient.Build(bytes.NewBufferString(manifestsToDelete.String()), false) - if err != nil { - return fmt.Errorf("unable to build test hooks: %v", err) - } - if _, errs := r.cfg.KubeClient.Delete(hooks); errs != nil { - return fmt.Errorf("unable to delete test hooks: %v", joinErrors(errs)) - } - } - return r.cfg.Releases.Update(rel) }