Commit 83df6ebc authored by fibonacci1729's avatar fibonacci1729

feat(rollback-storage): remove extraneous else block and fix type in records_test

parent 1d6c1617
......@@ -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 {
......
......@@ -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{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment