dump events in a namespace when tearing down
@@ -127,6 +127,15 @@ func makeK8sNamespace(baseFuncName string) string {
// TearDown will delete created names using clients.
func TearDown(client *Client) {
+ // Dump the events in the namespace
+ el, err := client.Kube.Kube.CoreV1().Events(client.Namespace).List(metav1.ListOptions{})
+ if err != nil {
+ client.T.Logf("Could not list events in the namespace %q: %v", client.Namespace, err)
+ } else {
+ for _, e := range el.Items {
+ client.T.Logf("EVENT: %v", e)
+ }
+ }
client.Tracker.Clean(true)
if err := DeleteNameSpace(client); err != nil {
client.T.Logf("Could not delete the namespace %q: %v", client.Namespace, err)
