Skip to content

Commit

Permalink
Revert "fix listCoontainerStats not filter"
Browse files Browse the repository at this point in the history
This reverts commit e643810.
  • Loading branch information
lengrongfu committed Jul 7, 2023
1 parent c810b6a commit fcb21b9
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions pkg/validate/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,9 @@ var _ = framework.KubeDescribe("Container", func() {

By("start container")
startContainer(rc, containerID)
filter := &runtimeapi.ContainerStatsFilter{
Id: containerID,
}

By("test container stats")
stats := listContainerStats(rc, filter)
stats := listContainerStats(rc, nil)
Expect(statFound(stats, containerID)).To(BeTrue(), "Stats should be found")
})

Expand All @@ -239,21 +236,10 @@ var _ = framework.KubeDescribe("Container", func() {
startContainer(rc, thirdContainerID)

By("test containers stats")
firstFilter := &runtimeapi.ContainerStatsFilter{
Id: firstContainerID,
}
firstStats := listContainerStats(rc, firstFilter)
secondFilter := &runtimeapi.ContainerStatsFilter{
Id: secondContainerID,
}
secondStats := listContainerStats(rc, secondFilter)
thirdFilter := &runtimeapi.ContainerStatsFilter{
Id: thirdContainerID,
}
thirdStats := listContainerStats(rc, thirdFilter)
Expect(statFound(firstStats, firstContainerID)).To(BeTrue(), "Stats should be found")
Expect(statFound(secondStats, secondContainerID)).To(BeTrue(), "Stats should be found")
Expect(statFound(thirdStats, thirdContainerID)).To(BeTrue(), "Stats should be found")
stats := listContainerStats(rc, nil)
Expect(statFound(stats, firstContainerID)).To(BeTrue(), "Stats should be found")
Expect(statFound(stats, secondContainerID)).To(BeTrue(), "Stats should be found")
Expect(statFound(stats, thirdContainerID)).To(BeTrue(), "Stats should be found")
})
})

Expand Down

0 comments on commit fcb21b9

Please sign in to comment.