daemon/events; fix TestLoadBufferedEventsOnlyFromPast

commit 70ad5b818f changed event.Type
to be a strong type, no longer an alias for string. for some reason,
this test passed on the PR, but failed later on;

    === Failed
    === FAIL: daemon/events TestLoadBufferedEventsOnlyFromPast (0.00s)
        events_test.go:203: assertion failed: network (messages[0].Type events.Type) != network (string)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-28 22:06:31 +02:00
parent a65c948e7e
commit 9331d6de1e
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -200,7 +200,7 @@ func TestLoadBufferedEventsOnlyFromPast(t *testing.T) {
messages := evts.loadBufferedEvents(since, until, nil)
assert.Assert(t, is.Len(messages, 1))
assert.Check(t, is.Equal(messages[0].Type, "network"))
assert.Check(t, is.Equal(messages[0].Type, events.NetworkEventType))
}
// Regression-test for https://github.com/moby/moby/issues/13753