From f7e2a78374283d94ffb5840e64f2cf222d31591a Mon Sep 17 00:00:00 2001 From: Abhilash Gnan Date: Fri, 5 Apr 2019 00:10:15 +0200 Subject: [PATCH] fix test cases for list.AllNamespaces Signed-off-by: Abhilash Gnan --- cmd/helm/list_test.go | 2 +- pkg/action/list_test.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/helm/list_test.go b/cmd/helm/list_test.go index e017265d6..8939119d8 100644 --- a/cmd/helm/list_test.go +++ b/cmd/helm/list_test.go @@ -65,7 +65,7 @@ func TestListCmd(t *testing.T) { Version: 1, Namespace: defaultNamespace, Info: &release.Info{ - LastDeployed: timestamp2, + LastDeployed: timestamp1, Status: release.StatusUninstalled, }, Chart: chartInfo, diff --git a/pkg/action/list_test.go b/pkg/action/list_test.go index 430a7affc..48e9a376a 100644 --- a/pkg/action/list_test.go +++ b/pkg/action/list_test.go @@ -81,6 +81,7 @@ func TestList_AllNamespaces(t *testing.T) { lister := newListFixture(t) makeMeSomeReleases(lister.cfg.Releases, t) lister.AllNamespaces = true + lister.SetStateMask() list, err := lister.Run() is.NoError(err) is.Len(list, 3) @@ -221,6 +222,11 @@ func makeMeSomeReleases(store *storage.Storage, t *testing.T) { three.Name = "three" three.Namespace = "default" 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} { if err := store.Create(rel); err != nil {