From d7bdbb075fdd37ed744cd2d51ff14827e78f4d94 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Fri, 29 Oct 2021 09:41:44 -0700 Subject: [PATCH] Add check for network stats to e2e tests --- test/e2e/windows/kubelet_stats.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/e2e/windows/kubelet_stats.go b/test/e2e/windows/kubelet_stats.go index 1bbb506a26c..6e614db17b6 100644 --- a/test/e2e/windows/kubelet_stats.go +++ b/test/e2e/windows/kubelet_stats.go @@ -80,6 +80,11 @@ var _ = SIGDescribe("[Feature:Windows] Kubelet-Stats [Serial]", func() { framework.ExpectEqual(*podStats.CPU.UsageCoreNanoSeconds > 0, true, "Pod stats should not report 0 cpu usage") framework.ExpectEqual(*podStats.Memory.WorkingSetBytes > 0, true, "Pod stats should not report 0 bytes for memory working set ") + framework.ExpectEqual(podStats.Network != nil, true, "Pod stats should report network stats") + framework.ExpectEqual(podStats.Network.Name != "", true, "Pod stats should report network name") + framework.ExpectEqual(*podStats.Network.TxBytes > 0, true, "Pod stats should report network Tx stats") + framework.ExpectEqual(len(podStats.Network.Interfaces) > 0, true, "Pod Stats should report individual interfaces stats") + for _, containerStats := range podStats.Containers { framework.ExpectEqual(containerStats.Logs != nil, true, "Pod stats should have container log stats") framework.ExpectEqual(*containerStats.Logs.AvailableBytes > 0, true, "container log stats should not report 0 bytes for AvailableBytes")