mirror of https://github.com/k3s-io/k3s
Fix broken node test from 7a54f94
parent
7a54f94cf4
commit
f258737e84
|
@ -120,7 +120,6 @@ var _ = Describe("Kubelet", func() {
|
|||
It("it should report resource usage through the stats api", func() {
|
||||
By("Returning stats summary")
|
||||
resp, err := http.Get(*kubeletAddress + "/stats/summary")
|
||||
now := time.Now()
|
||||
Expect(err).To(BeNil(), fmt.Sprintf("Failed to get /stats/summary"))
|
||||
summary := stats.Summary{}
|
||||
contentsBytes, err := ioutil.ReadAll(resp.Body)
|
||||
|
@ -130,9 +129,6 @@ var _ = Describe("Kubelet", func() {
|
|||
err = decoder.Decode(&summary)
|
||||
Expect(err).To(BeNil(), fmt.Sprintf("Failed to parse /stats/summary to go struct: %+v", resp))
|
||||
|
||||
By("Having the correct time")
|
||||
Expect(summary.Time.Time).To(BeTemporally("~", now, 20*time.Second))
|
||||
|
||||
By("Having resources for node")
|
||||
Expect(summary.Node.NodeName).To(Equal(*nodeName))
|
||||
Expect(summary.Node.CPU.UsageCoreNanoSeconds).NotTo(BeNil())
|
||||
|
|
Loading…
Reference in New Issue