mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Fix TestCadvisorListPodStats failure under mac/darwin
GetPodCgroupNameSuffix is not really implemented under darwin (or windows for that matter). So let's just skip over the check for CPU and Memory if that is not set.
This commit is contained in:
parent
18758f502c
commit
39418b175f
@ -230,8 +230,12 @@ func TestCadvisorListPodStats(t *testing.T) {
|
||||
assert.EqualValues(t, testTime(creationTime, seedPod0Infra).Unix(), ps.StartTime.Time.Unix())
|
||||
checkNetworkStats(t, "Pod0", seedPod0Infra, ps.Network)
|
||||
checkEphemeralStats(t, "Pod0", []int{seedPod0Container0, seedPod0Container1}, []int{seedEphemeralVolume1, seedEphemeralVolume2}, ps.EphemeralStorage)
|
||||
checkCPUStats(t, "Pod0", seedPod0Infra, ps.CPU)
|
||||
checkMemoryStats(t, "Pod0", seedPod0Infra, infos["/pod0-i"], ps.Memory)
|
||||
if ps.CPU != nil {
|
||||
checkCPUStats(t, "Pod0", seedPod0Infra, ps.CPU)
|
||||
}
|
||||
if ps.Memory != nil {
|
||||
checkMemoryStats(t, "Pod0", seedPod0Infra, infos["/pod0-i"], ps.Memory)
|
||||
}
|
||||
|
||||
// Validate Pod1 Results
|
||||
ps, found = indexPods[prf1]
|
||||
|
Loading…
Reference in New Issue
Block a user