File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,17 @@ func TestEventChannelFull(t *testing.T) {
217
217
{ID : "1234" , Type : ContainerDied , Data : "c2" },
218
218
{ID : "1234" , Type : ContainerStarted , Data : "c3" },
219
219
{ID : "4567" , Type : ContainerRemoved , Data : "c1" },
220
+ {ID : "4567" , Type : ContainerStarted , Data : "c4" },
220
221
}
221
222
actual = getEventsFromChannel (ch )
222
- verifyEvents (t , expected , actual )
223
+ assert .True (t , len (actual ) == 4 , "channel length should be 4" )
224
+ for _ , actualEvent := range actual {
225
+ for _ , expectedEvent := range expected {
226
+ if actualEvent .ID == expectedEvent .ID && actualEvent .Data == expectedEvent .Data {
227
+ assert .True (t , actualEvent .Type == expectedEvent .Type , "event type should be equal" )
228
+ }
229
+ }
230
+ }
223
231
}
224
232
225
233
func TestDetectingContainerDeaths (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments