fix test cases for list.AllNamespaces

Signed-off-by: Abhilash Gnan <abhilashgnan@gmail.com>
pull/5539/head
Abhilash Gnan 6 years ago
parent f4c2b02cef
commit f7e2a78374

@ -65,7 +65,7 @@ func TestListCmd(t *testing.T) {
Version: 1, Version: 1,
Namespace: defaultNamespace, Namespace: defaultNamespace,
Info: &release.Info{ Info: &release.Info{
LastDeployed: timestamp2, LastDeployed: timestamp1,
Status: release.StatusUninstalled, Status: release.StatusUninstalled,
}, },
Chart: chartInfo, Chart: chartInfo,

@ -81,6 +81,7 @@ func TestList_AllNamespaces(t *testing.T) {
lister := newListFixture(t) lister := newListFixture(t)
makeMeSomeReleases(lister.cfg.Releases, t) makeMeSomeReleases(lister.cfg.Releases, t)
lister.AllNamespaces = true lister.AllNamespaces = true
lister.SetStateMask()
list, err := lister.Run() list, err := lister.Run()
is.NoError(err) is.NoError(err)
is.Len(list, 3) is.Len(list, 3)
@ -221,6 +222,11 @@ func makeMeSomeReleases(store *storage.Storage, t *testing.T) {
three.Name = "three" three.Name = "three"
three.Namespace = "default" three.Namespace = "default"
three.Version = 3 three.Version = 3
four := releaseStub()
four.Name = "four"
four.Namespace = "default"
four.Version = 4
four.Info.Status = release.StatusSuperseded
for _, rel := range []*release.Release{one, two, three} { for _, rel := range []*release.Release{one, two, three} {
if err := store.Create(rel); err != nil { if err := store.Create(rel); err != nil {

Loading…
Cancel
Save