mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Log failed containers after summary e2e test
This commit is contained in:
parent
33ebe1f18b
commit
7656ffeec6
@ -35,6 +35,11 @@ import (
|
||||
var _ = framework.KubeDescribe("Summary API", func() {
|
||||
f := framework.NewDefaultFramework("summary-test")
|
||||
Context("when querying /stats/summary", func() {
|
||||
AfterEach(func() {
|
||||
if CurrentGinkgoTestDescription().Failed && framework.TestContext.DumpLogsOnFailure {
|
||||
framework.LogFailedContainers(f.ClientSet, f.Namespace.Name, framework.Logf)
|
||||
}
|
||||
})
|
||||
It("should report resource usage through the stats api", func() {
|
||||
const pod0 = "stats-busybox-0"
|
||||
const pod1 = "stats-busybox-1"
|
||||
@ -214,7 +219,7 @@ func createSummaryTestPods(f *framework.Framework, names ...string) {
|
||||
{
|
||||
Name: "busybox-container",
|
||||
Image: "gcr.io/google_containers/busybox:1.24",
|
||||
Command: []string{"sh", "-c", "ping -c 1 google.com; while true; do echo 'hello world' | tee /test-empty-dir-mnt/file ; sleep 1; done"},
|
||||
Command: []string{"sh", "-c", "ping -c 1 google.com; while true; do echo 'hello world' >> /test-empty-dir-mnt/file ; sleep 1; done"},
|
||||
Resources: api.ResourceRequirements{
|
||||
Limits: api.ResourceList{
|
||||
// Must set memory limit to get MemoryStats.AvailableBytes
|
||||
|
Loading…
Reference in New Issue
Block a user