@@ -214,9 +214,12 @@ var _ = framework.KubeDescribe("Container", func() {
214
214
215
215
By ("start container" )
216
216
startContainer (rc , containerID )
217
+ filter := & runtimeapi.ContainerStatsFilter {
218
+ Id : containerID ,
219
+ }
217
220
218
221
By ("test container stats" )
219
- stats := listContainerStats (rc , nil )
222
+ stats := listContainerStats (rc , filter )
220
223
Expect (statFound (stats , containerID )).To (BeTrue (), "Stats should be found" )
221
224
})
222
225
@@ -236,10 +239,21 @@ var _ = framework.KubeDescribe("Container", func() {
236
239
startContainer (rc , thirdContainerID )
237
240
238
241
By ("test containers stats" )
239
- stats := listContainerStats (rc , nil )
240
- Expect (statFound (stats , firstContainerID )).To (BeTrue (), "Stats should be found" )
241
- Expect (statFound (stats , secondContainerID )).To (BeTrue (), "Stats should be found" )
242
- Expect (statFound (stats , thirdContainerID )).To (BeTrue (), "Stats should be found" )
242
+ firstFilter := & runtimeapi.ContainerStatsFilter {
243
+ Id : firstContainerID ,
244
+ }
245
+ firstStats := listContainerStats (rc , firstFilter )
246
+ secondFilter := & runtimeapi.ContainerStatsFilter {
247
+ Id : secondContainerID ,
248
+ }
249
+ secondStats := listContainerStats (rc , secondFilter )
250
+ thirdFilter := & runtimeapi.ContainerStatsFilter {
251
+ Id : thirdContainerID ,
252
+ }
253
+ thirdStats := listContainerStats (rc , thirdFilter )
254
+ Expect (statFound (firstStats , firstContainerID )).To (BeTrue (), "Stats should be found" )
255
+ Expect (statFound (secondStats , secondContainerID )).To (BeTrue (), "Stats should be found" )
256
+ Expect (statFound (thirdStats , thirdContainerID )).To (BeTrue (), "Stats should be found" )
243
257
})
244
258
})
245
259
0 commit comments