mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
fixes 92907 improves test error output
This commit is contained in:
parent
bf94f27e76
commit
10bdcb8ef1
@ -419,7 +419,7 @@ func verifyEvents(e coreclientset.EventInterface, options metav1.ListOptions, nu
|
|||||||
count += int(event.Count)
|
count += int(event.Count)
|
||||||
}
|
}
|
||||||
if count != num {
|
if count != num {
|
||||||
return fmt.Errorf("expect event number %d, got %d: %v", num, count, events.Items)
|
return fmt.Errorf("Expected %d events with reason set to %s and message set to %s\nbut %d actual events occured. Events : %v", num, reason, message, count, events.Items)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -435,7 +435,7 @@ func verifyTotalEvents(e coreclientset.EventInterface, options metav1.ListOption
|
|||||||
count += int(event.Count)
|
count += int(event.Count)
|
||||||
}
|
}
|
||||||
if count != num {
|
if count != num {
|
||||||
return fmt.Errorf("expect event number %d, got %d: %v", num, count, events.Items)
|
return fmt.Errorf("expected total number of events was %d, actual events counted was %d\nEvents : %v", num, count, events.Items)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user