fix unit tests

Signed-off-by: Benjamen Keroack <benjamen.keroack@dollarshaveclub.com>
pull/4971/head
Benjamen Keroack 7 years ago
parent 43c446d76a
commit d3a92dd1da

@ -312,7 +312,9 @@ func (rs mockStream) SendHeader(m metadata.MD) error { return nil }
func (rs mockStream) SetTrailer(m metadata.MD) {} func (rs mockStream) SetTrailer(m metadata.MD) {}
func (rs mockStream) SendMsg(v interface{}) error { return nil } func (rs mockStream) SendMsg(v interface{}) error { return nil }
func (rs mockStream) RecvMsg(v interface{}) error { return nil } func (rs mockStream) RecvMsg(v interface{}) error { return nil }
func (rs mockStream) Context() context.Context { return helm.NewContext() } func (rs mockStream) Context() context.Context {
return helm.NewContext(context.Background())
}
type podSucceededKubeClient struct { type podSucceededKubeClient struct {
tillerEnv.PrintingKubeClient tillerEnv.PrintingKubeClient

@ -19,12 +19,13 @@ package tiller
import ( import (
"testing" "testing"
"golang.org/x/net/context"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/proto/hapi/services"
) )
func TestGetReleaseContent(t *testing.T) { func TestGetReleaseContent(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
if err := rs.env.Releases.Create(rel); err != nil { if err := rs.env.Releases.Create(rel); err != nil {

@ -20,6 +20,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"golang.org/x/net/context"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
rpb "k8s.io/helm/pkg/proto/hapi/release" rpb "k8s.io/helm/pkg/proto/hapi/release"
tpb "k8s.io/helm/pkg/proto/hapi/services" tpb "k8s.io/helm/pkg/proto/hapi/services"
@ -77,7 +78,7 @@ func TestGetHistory_WithRevisions(t *testing.T) {
// run tests // run tests
for _, tt := range tests { for _, tt := range tests {
res, err := srv.GetHistory(helm.NewContext(), tt.req) res, err := srv.GetHistory(helm.NewContext(context.Background()), tt.req)
if err != nil { if err != nil {
t.Fatalf("%s:\nFailed to get History of %q: %s", tt.desc, tt.req.Name, err) t.Fatalf("%s:\nFailed to get History of %q: %s", tt.desc, tt.req.Name, err)
} }
@ -104,7 +105,7 @@ func TestGetHistory_WithNoRevisions(t *testing.T) {
srv.env.Releases.Create(rls) srv.env.Releases.Create(rls)
for _, tt := range tests { for _, tt := range tests {
res, err := srv.GetHistory(helm.NewContext(), tt.req) res, err := srv.GetHistory(helm.NewContext(context.Background()), tt.req)
if err != nil { if err != nil {
t.Fatalf("%s:\nFailed to get History of %q: %s", tt.desc, tt.req.Name, err) t.Fatalf("%s:\nFailed to get History of %q: %s", tt.desc, tt.req.Name, err)
} }

@ -21,6 +21,7 @@ import (
"strings" "strings"
"testing" "testing"
"golang.org/x/net/context"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/proto/hapi/chart"
"k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/proto/hapi/release"
@ -61,7 +62,7 @@ func TestHasCRDHook(t *testing.T) {
} }
func TestInstallRelease(t *testing.T) { func TestInstallRelease(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest() req := installRequest()
@ -115,7 +116,7 @@ func TestInstallRelease(t *testing.T) {
} }
func TestInstallRelease_WithNotes(t *testing.T) { func TestInstallRelease_WithNotes(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest( req := installRequest(
@ -175,7 +176,7 @@ func TestInstallRelease_WithNotes(t *testing.T) {
} }
func TestInstallRelease_WithNotesRendered(t *testing.T) { func TestInstallRelease_WithNotesRendered(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest( req := installRequest(
@ -237,7 +238,7 @@ func TestInstallRelease_WithNotesRendered(t *testing.T) {
func TestInstallRelease_TillerVersion(t *testing.T) { func TestInstallRelease_TillerVersion(t *testing.T) {
version.Version = "2.2.0" version.Version = "2.2.0"
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest( req := installRequest(
@ -251,7 +252,7 @@ func TestInstallRelease_TillerVersion(t *testing.T) {
func TestInstallRelease_WrongTillerVersion(t *testing.T) { func TestInstallRelease_WrongTillerVersion(t *testing.T) {
version.Version = "2.2.0" version.Version = "2.2.0"
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest( req := installRequest(
@ -269,7 +270,7 @@ func TestInstallRelease_WrongTillerVersion(t *testing.T) {
} }
func TestInstallRelease_WithChartAndDependencyNotes(t *testing.T) { func TestInstallRelease_WithChartAndDependencyNotes(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest(withChart( req := installRequest(withChart(
@ -301,7 +302,7 @@ func TestInstallRelease_WithChartAndDependencyNotes(t *testing.T) {
} }
func TestInstallRelease_DryRun(t *testing.T) { func TestInstallRelease_DryRun(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest(withDryRun(), req := installRequest(withDryRun(),
@ -353,7 +354,7 @@ func TestInstallRelease_DryRun(t *testing.T) {
} }
func TestInstallRelease_NoHooks(t *testing.T) { func TestInstallRelease_NoHooks(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
@ -369,7 +370,7 @@ func TestInstallRelease_NoHooks(t *testing.T) {
} }
func TestInstallRelease_CRDInstallHook(t *testing.T) { func TestInstallRelease_CRDInstallHook(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
@ -396,7 +397,7 @@ func TestInstallRelease_CRDInstallHook(t *testing.T) {
} }
func TestInstallRelease_DryRunCRDInstallHook(t *testing.T) { func TestInstallRelease_DryRunCRDInstallHook(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
@ -418,7 +419,7 @@ func TestInstallRelease_DryRunCRDInstallHook(t *testing.T) {
} }
func TestInstallRelease_FailedHooks(t *testing.T) { func TestInstallRelease_FailedHooks(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
rs.env.KubeClient = newHookFailingKubeClient() rs.env.KubeClient = newHookFailingKubeClient()
@ -435,7 +436,7 @@ func TestInstallRelease_FailedHooks(t *testing.T) {
} }
func TestInstallRelease_ReuseName(t *testing.T) { func TestInstallRelease_ReuseName(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rel.Info.Status.Code = release.Status_DELETED rel.Info.Status.Code = release.Status_DELETED
@ -465,7 +466,7 @@ func TestInstallRelease_ReuseName(t *testing.T) {
} }
func TestInstallRelease_KubeVersion(t *testing.T) { func TestInstallRelease_KubeVersion(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest( req := installRequest(
@ -478,7 +479,7 @@ func TestInstallRelease_KubeVersion(t *testing.T) {
} }
func TestInstallRelease_WrongKubeVersion(t *testing.T) { func TestInstallRelease_WrongKubeVersion(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
req := installRequest( req := installRequest(
@ -497,7 +498,7 @@ func TestInstallRelease_WrongKubeVersion(t *testing.T) {
} }
func TestInstallRelease_Description(t *testing.T) { func TestInstallRelease_Description(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())

@ -20,13 +20,14 @@ import (
"strings" "strings"
"testing" "testing"
"golang.org/x/net/context"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/proto/hapi/services"
) )
func TestRollbackRelease(t *testing.T) { func TestRollbackRelease(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -137,7 +138,7 @@ func TestRollbackRelease(t *testing.T) {
} }
func TestRollbackWithReleaseVersion(t *testing.T) { func TestRollbackWithReleaseVersion(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.Log = t.Logf rs.Log = t.Logf
rs.env.Releases.Log = t.Logf rs.env.Releases.Log = t.Logf
@ -185,7 +186,7 @@ func TestRollbackWithReleaseVersion(t *testing.T) {
} }
func TestRollbackDeleted(t *testing.T) { func TestRollbackDeleted(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.Log = t.Logf rs.Log = t.Logf
rs.env.Releases.Log = t.Logf rs.env.Releases.Log = t.Logf
@ -251,7 +252,7 @@ func TestRollbackDeleted(t *testing.T) {
} }
func TestRollbackReleaseNoHooks(t *testing.T) { func TestRollbackReleaseNoHooks(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rel.Hooks = []*release.Hook{ rel.Hooks = []*release.Hook{
@ -287,7 +288,7 @@ func TestRollbackReleaseNoHooks(t *testing.T) {
} }
func TestRollbackReleaseFailure(t *testing.T) { func TestRollbackReleaseFailure(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -320,7 +321,7 @@ func TestRollbackReleaseFailure(t *testing.T) {
} }
func TestRollbackReleaseWithCustomDescription(t *testing.T) { func TestRollbackReleaseWithCustomDescription(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)

@ -521,7 +521,7 @@ func (l *mockListServer) Send(res *services.ListReleasesResponse) error {
return nil return nil
} }
func (l *mockListServer) Context() context.Context { return helm.NewContext() } func (l *mockListServer) Context() context.Context { return helm.NewContext(context.Background()) }
func (l *mockListServer) SendMsg(v interface{}) error { return nil } func (l *mockListServer) SendMsg(v interface{}) error { return nil }
func (l *mockListServer) RecvMsg(v interface{}) error { return nil } func (l *mockListServer) RecvMsg(v interface{}) error { return nil }
func (l *mockListServer) SendHeader(m metadata.MD) error { return nil } func (l *mockListServer) SendHeader(m metadata.MD) error { return nil }
@ -538,7 +538,9 @@ func (rs mockRunReleaseTestServer) SendHeader(m metadata.MD) error { return nil
func (rs mockRunReleaseTestServer) SetTrailer(m metadata.MD) {} func (rs mockRunReleaseTestServer) SetTrailer(m metadata.MD) {}
func (rs mockRunReleaseTestServer) SendMsg(v interface{}) error { return nil } func (rs mockRunReleaseTestServer) SendMsg(v interface{}) error { return nil }
func (rs mockRunReleaseTestServer) RecvMsg(v interface{}) error { return nil } func (rs mockRunReleaseTestServer) RecvMsg(v interface{}) error { return nil }
func (rs mockRunReleaseTestServer) Context() context.Context { return helm.NewContext() } func (rs mockRunReleaseTestServer) Context() context.Context {
return helm.NewContext(context.Background())
}
type mockHooksManifest struct { type mockHooksManifest struct {
Metadata struct { Metadata struct {

@ -19,13 +19,14 @@ package tiller
import ( import (
"testing" "testing"
"golang.org/x/net/context"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/proto/hapi/services"
) )
func TestGetReleaseStatus(t *testing.T) { func TestGetReleaseStatus(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
if err := rs.env.Releases.Create(rel); err != nil { if err := rs.env.Releases.Create(rel); err != nil {
@ -46,7 +47,7 @@ func TestGetReleaseStatus(t *testing.T) {
} }
func TestGetReleaseStatusDeleted(t *testing.T) { func TestGetReleaseStatusDeleted(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rel.Info.Status.Code = release.Status_DELETED rel.Info.Status.Code = release.Status_DELETED

@ -20,13 +20,14 @@ import (
"strings" "strings"
"testing" "testing"
"golang.org/x/net/context"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/proto/hapi/services"
) )
func TestUninstallRelease(t *testing.T) { func TestUninstallRelease(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
@ -61,7 +62,7 @@ func TestUninstallRelease(t *testing.T) {
} }
func TestUninstallPurgeRelease(t *testing.T) { func TestUninstallPurgeRelease(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -90,7 +91,7 @@ func TestUninstallPurgeRelease(t *testing.T) {
if res.Release.Info.Deleted.Seconds <= 0 { if res.Release.Info.Deleted.Seconds <= 0 {
t.Errorf("Expected valid UNIX date, got %d", res.Release.Info.Deleted.Seconds) t.Errorf("Expected valid UNIX date, got %d", res.Release.Info.Deleted.Seconds)
} }
rels, err := rs.GetHistory(helm.NewContext(), &services.GetHistoryRequest{Name: "angry-panda"}) rels, err := rs.GetHistory(helm.NewContext(context.Background()), &services.GetHistoryRequest{Name: "angry-panda"})
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@ -100,7 +101,7 @@ func TestUninstallPurgeRelease(t *testing.T) {
} }
func TestUninstallPurgeDeleteRelease(t *testing.T) { func TestUninstallPurgeDeleteRelease(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
@ -125,7 +126,7 @@ func TestUninstallPurgeDeleteRelease(t *testing.T) {
} }
func TestUninstallReleaseWithKeepPolicy(t *testing.T) { func TestUninstallReleaseWithKeepPolicy(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
name := "angry-bunny" name := "angry-bunny"
rs.env.Releases.Create(releaseWithKeepStub(name)) rs.env.Releases.Create(releaseWithKeepStub(name))
@ -157,7 +158,7 @@ func TestUninstallReleaseWithKeepPolicy(t *testing.T) {
} }
func TestUninstallReleaseNoHooks(t *testing.T) { func TestUninstallReleaseNoHooks(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
@ -178,7 +179,7 @@ func TestUninstallReleaseNoHooks(t *testing.T) {
} }
func TestUninstallReleaseCustomDescription(t *testing.T) { func TestUninstallReleaseCustomDescription(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rs.env.Releases.Create(releaseStub()) rs.env.Releases.Create(releaseStub())
@ -199,7 +200,7 @@ func TestUninstallReleaseCustomDescription(t *testing.T) {
} }
func TestUninstallReleaseObjectNotFoundError(t *testing.T) { func TestUninstallReleaseObjectNotFoundError(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
manifest := `kind: ConfigMap manifest := `kind: ConfigMap

@ -22,17 +22,19 @@ import (
"testing" "testing"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"reflect"
"k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/chartutil"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/proto/hapi/chart"
"k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/proto/hapi/services"
"reflect"
) )
func TestUpdateRelease(t *testing.T) { func TestUpdateRelease(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -105,7 +107,7 @@ func TestUpdateRelease(t *testing.T) {
} }
} }
func TestUpdateRelease_ResetValues(t *testing.T) { func TestUpdateRelease_ResetValues(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -132,7 +134,7 @@ func TestUpdateRelease_ResetValues(t *testing.T) {
} }
func TestUpdateRelease_ReuseValuesWithNoValues(t *testing.T) { func TestUpdateRelease_ReuseValuesWithNoValues(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
installReq := &services.InstallReleaseRequest{ installReq := &services.InstallReleaseRequest{
@ -171,7 +173,7 @@ func TestUpdateRelease_ReuseValuesWithNoValues(t *testing.T) {
} }
func TestUpdateRelease_NestedReuseValues(t *testing.T) { func TestUpdateRelease_NestedReuseValues(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
installReq := &services.InstallReleaseRequest{ installReq := &services.InstallReleaseRequest{
@ -237,7 +239,7 @@ root:
// This is a regression test for bug found in issue #3655 // This is a regression test for bug found in issue #3655
func TestUpdateRelease_ComplexReuseValues(t *testing.T) { func TestUpdateRelease_ComplexReuseValues(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
installReq := &services.InstallReleaseRequest{ installReq := &services.InstallReleaseRequest{
@ -337,7 +339,7 @@ func TestUpdateRelease_ComplexReuseValues(t *testing.T) {
} }
func TestUpdateRelease_ReuseValues(t *testing.T) { func TestUpdateRelease_ReuseValues(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -375,7 +377,7 @@ func TestUpdateRelease_ReuseValues(t *testing.T) {
func TestUpdateRelease_ResetReuseValues(t *testing.T) { func TestUpdateRelease_ResetReuseValues(t *testing.T) {
// This verifies that when both reset and reuse are set, reset wins. // This verifies that when both reset and reuse are set, reset wins.
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -404,7 +406,7 @@ func TestUpdateRelease_ResetReuseValues(t *testing.T) {
} }
func TestUpdateReleaseFailure(t *testing.T) { func TestUpdateReleaseFailure(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -448,7 +450,7 @@ func TestUpdateReleaseFailure(t *testing.T) {
} }
func TestUpdateReleaseFailure_Force(t *testing.T) { func TestUpdateReleaseFailure_Force(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := namedReleaseStub("forceful-luke", release.Status_FAILED) rel := namedReleaseStub("forceful-luke", release.Status_FAILED)
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -492,7 +494,7 @@ func TestUpdateReleaseFailure_Force(t *testing.T) {
} }
func TestUpdateReleaseNoHooks(t *testing.T) { func TestUpdateReleaseNoHooks(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -521,7 +523,7 @@ func TestUpdateReleaseNoHooks(t *testing.T) {
} }
func TestUpdateReleaseNoChanges(t *testing.T) { func TestUpdateReleaseNoChanges(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -539,7 +541,7 @@ func TestUpdateReleaseNoChanges(t *testing.T) {
} }
func TestUpdateReleaseCustomDescription(t *testing.T) { func TestUpdateReleaseCustomDescription(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -563,7 +565,7 @@ func TestUpdateReleaseCustomDescription(t *testing.T) {
} }
func TestUpdateReleaseCustomDescription_Force(t *testing.T) { func TestUpdateReleaseCustomDescription_Force(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := releaseStub() rel := releaseStub()
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)
@ -588,7 +590,7 @@ func TestUpdateReleaseCustomDescription_Force(t *testing.T) {
} }
func TestUpdateReleasePendingInstall_Force(t *testing.T) { func TestUpdateReleasePendingInstall_Force(t *testing.T) {
c := helm.NewContext() c := helm.NewContext(context.Background())
rs := rsFixture() rs := rsFixture()
rel := namedReleaseStub("forceful-luke", release.Status_PENDING_INSTALL) rel := namedReleaseStub("forceful-luke", release.Status_PENDING_INSTALL)
rs.env.Releases.Create(rel) rs.env.Releases.Create(rel)

Loading…
Cancel
Save