MCPcopy
hub / github.com/helm/helm / TestList_Sort

Function TestList_Sort

pkg/action/list_test.go:96–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

94}
95
96func TestList_Sort(t *testing.T) {
97 is := assert.New(t)
98 lister := newListFixture(t)
99 lister.Sort = ByNameDesc // Other sorts are tested elsewhere
100 makeMeSomeReleases(t, lister.cfg.Releases)
101 l, err := lister.Run()
102 is.NoError(err)
103 list, err := releaseListToV1List(l)
104 is.NoError(err)
105
106 is.Len(list, 3)
107 is.Equal("two", list[0].Name)
108 is.Equal("three", list[1].Name)
109 is.Equal("one", list[2].Name)
110}
111
112func TestList_Limit(t *testing.T) {
113 is := assert.New(t)

Callers

nothing calls this directly

Calls 5

newListFixtureFunction · 0.85
makeMeSomeReleasesFunction · 0.85
releaseListToV1ListFunction · 0.70
RunMethod · 0.65
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…