Skip to content

Commit

Permalink
chore(e2e): Add cronjobs to test support dump
Browse files Browse the repository at this point in the history
  • Loading branch information
gansheer committed Aug 22, 2024
1 parent 2c35ef5 commit 95bfa8b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions e2e/support/util/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,21 @@ func Dump(ctx context.Context, c client.Client, ns string, t *testing.T) error {
}
}

// Cronjobs
cronjobs, err := c.BatchV1().CronJobs(ns).List(ctx, metav1.ListOptions{})
if err != nil {
return err
}
t.Logf("\nFound %d cronjobs:\n", len(cronjobs.Items))
for _, cronjobs := range cronjobs.Items {
ref := cronjobs
data, err := kubernetes.ToYAMLNoManagedFields(&ref)
if err != nil {
return err
}
t.Logf("---\n%s\n---\n", string(data))
}

// OLM CSV
csvs := olm.ClusterServiceVersionList{}
err = c.List(ctx, &csvs, ctrl.InNamespace(ns))
Expand Down

0 comments on commit 95bfa8b

Please sign in to comment.