add bootid support for windows node.

Signed-off-by: MartinForReal <fanshangxiang@gmail.com>
This commit is contained in:
MartinForReal
2022-03-15 11:29:42 +00:00
committed by GitHub
parent 02b1ec5b0b
commit d529b7e10b
2 changed files with 40 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ var _ = SIGDescribe("[Feature:Windows] Kubelet-Stats [Serial]", func() {
f := framework.NewDefaultFramework("kubelet-stats-test-windows-serial")
ginkgo.Describe("Kubelet stats collection for Windows nodes", func() {
ginkgo.Context("when running 10 pods", func() {
// 10 seconds is the default scrape timeout for metrics-server and kube-prometheus
ginkgo.It("should return within 10 seconds", func() {
@@ -113,6 +114,19 @@ var _ = SIGDescribe("[Feature:Windows] Kubelet-Stats", func() {
f := framework.NewDefaultFramework("kubelet-stats-test-windows")
ginkgo.Describe("Kubelet stats collection for Windows nodes", func() {
ginkgo.Context("when windows is booted", func() {
ginkgo.It("should return bootid within 10 seconds", func() {
ginkgo.By("Selecting a Windows node")
targetNode, err := findWindowsNode(f)
framework.ExpectNoError(err, "Error finding Windows node")
framework.Logf("Using node: %v", targetNode.Name)
ginkgo.By("Getting bootid")
framework.ExpectEqual(len(targetNode.Status.NodeInfo.BootID) != 0, true, "Should find bootId in kubelet stats")
})
})
ginkgo.Context("when running 3 pods", func() {
// 10 seconds is the default scrape timeout for metrics-server and kube-prometheus
ginkgo.It("should return within 10 seconds", func() {