From 83df6ebc4d884ed0c389b75eb8778676cff8ce8e Mon Sep 17 00:00:00 2001 From: fibonacci1729 Date: Mon, 12 Sep 2016 09:16:03 -0600 Subject: [PATCH] feat(rollback-storage): remove extraneous else block and fix type in records_test --- cmd/tiller/release_server.go | 12 ++++++------ pkg/storage/driver/records_test.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/tiller/release_server.go b/cmd/tiller/release_server.go index bd45091e5..c6263c289 100644 --- a/cmd/tiller/release_server.go +++ b/cmd/tiller/release_server.go @@ -181,16 +181,16 @@ func (s *releaseServer) GetReleaseStatus(c ctx.Context, req *services.GetRelease } var rel *release.Release + var err error + if req.Version <= 0 { - var err error if rel, err = s.env.Releases.Deployed(req.Name); err != nil { return nil, err } - } else { - var err error - if rel, err = s.env.Releases.Get(req.Name, req.Version); err != nil { - return nil, err - } + } + + if rel, err = s.env.Releases.Get(req.Name, req.Version); err != nil { + return nil, err } if rel.Info == nil { diff --git a/pkg/storage/driver/records_test.go b/pkg/storage/driver/records_test.go index 3597072f8..99f8b2d0d 100644 --- a/pkg/storage/driver/records_test.go +++ b/pkg/storage/driver/records_test.go @@ -65,7 +65,7 @@ func TestRecordsRemove(t *testing.T) { }{ {"remove valid key", "rls-a.v1", false}, {"remove invalid key", "rls-a.v", true}, - {"remove non-existant key", "rls-z.v1", true}, + {"remove non-existent key", "rls-z.v1", true}, } rs := records([]*record{