mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Print running containers in infra container oom score test.
This commit is contained in:
parent
b88b31cff4
commit
1226c5794a
@ -92,6 +92,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() {
|
||||
return validateOOMScoreAdjSetting(kubeletPids[0], -999)
|
||||
}, 5*time.Minute, 30*time.Second).Should(BeNil())
|
||||
})
|
||||
Context("", func() {
|
||||
It("pod infra containers oom-score-adj should be -998 and best effort container's should be 1000", func() {
|
||||
var err error
|
||||
podClient := f.PodClient()
|
||||
@ -135,7 +136,17 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() {
|
||||
}
|
||||
return validateOOMScoreAdjSetting(shPids[0], 1000)
|
||||
}, 2*time.Minute, time.Second*4).Should(BeNil())
|
||||
|
||||
})
|
||||
// Log the running containers here to help debugging. Use `docker ps`
|
||||
// directly for now because the test is already docker specific.
|
||||
AfterEach(func() {
|
||||
if CurrentGinkgoTestDescription().Failed {
|
||||
By("Dump all running docker containers")
|
||||
output, err := exec.Command("docker", "ps").CombinedOutput()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
framework.Logf("Running docker containers:\n%s", string(output))
|
||||
}
|
||||
})
|
||||
})
|
||||
It("guaranteed container's oom-score-adj should be -998", func() {
|
||||
podClient := f.PodClient()
|
||||
|
Loading…
Reference in New Issue
Block a user