1
0
mirror of https://github.com/helm/chart-testing.git synced 2026-02-05 09:45:14 +01:00

Sort event list (#584)

It's much easier to see the order of actions when the events are sorted
by lastTimestamp. This adds that flag to the GetEvents function.

Signed-off-by: Joe Julian <me@joejulian.name>
This commit is contained in:
Joe Julian
2023-08-15 18:04:53 -07:00
committed by GitHub
parent 61d02d70c8
commit d8fe2ba87c

View File

@@ -222,7 +222,7 @@ func (k Kubectl) GetPods(args ...string) ([]string, error) {
func (k Kubectl) GetEvents(namespace string) error {
return k.exec.RunProcess("kubectl",
fmt.Sprintf("--request-timeout=%s", k.timeout),
"get", "events", "--output", "wide", "--namespace", namespace)
"get", "events", "--output", "wide", "--namespace", namespace, "--sort-by", "lastTimestamp")
}
func (k Kubectl) DescribePod(namespace string, pod string) error {