This repository was archived by the owner on Sep 9, 2020. It is now read-only.
File tree Expand file treeCollapse file tree 3 files changed+13
-4
lines changedFilter options
+13
-4
lines changed Original file line number Diff line number Diff line change
@@ -126,6 +126,10 @@ func (cl *ComponentList) listComponentsWide(components []component.Component) er
126
126
rows = append(rows, row)
127
127
}
128
128
129
+
sort.Slice(rows, func(i, j int) bool {
130
+
return rows[i][0] < rows[j][0]
131
+
})
132
+
129
133
table := table.New(cl.out)
130
134
table.SetHeader([]string{"component", "type", "apiversion", "kind", "name"})
131
135
table.AppendBulk(rows)
Original file line number Diff line number Diff line change
@@ -68,11 +68,15 @@ func TestComponentList_wide(t *testing.T) {
68
68
module := ""
69
69
output := "wide"
70
70
71
-
summary := component.Summary{ComponentName: "deployment"}
72
-
c := &cmocks.Component{}
73
-
c.On("Summarize").Return(summary, nil)
71
+
summary1 := component.Summary{ComponentName: "ingress"}
72
+
c1 := &cmocks.Component{}
73
+
c1.On("Summarize").Return(summary1, nil)
74
74
75
-
cs := []component.Component{c}
75
+
summary2 := component.Summary{ComponentName: "deployment"}
76
+
c2 := &cmocks.Component{}
77
+
c2.On("Summarize").Return(summary2, nil)
78
+
79
+
cs := []component.Component{c1, c2}
76
80
77
81
ns := &cmocks.Module{}
78
82
ns.On("Components").Return(cs, nil)
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
1
1
COMPONENT TYPE APIVERSION KIND NAME
2
2
========= ==== ========== ==== ====
3
3
deployment
4
+
ingress
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4