prysm-pulse/io/logs/stream_test.go
terence 5a66807989
Update to V5 (#13622)
* First take at updating everything to v5

* Patch gRPC gateway to use prysm v5

Fix patch

* Update go ssz

---------

Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
2024-02-15 05:46:47 +00:00

24 lines
415 B
Go

package logs
import (
"testing"
"github.com/prysmaticlabs/prysm/v5/testing/require"
)
func TestStreamServer_BackfillsMessages(t *testing.T) {
ss := NewStreamServer()
msgs := [][]byte{
[]byte("foo"),
[]byte("bar"),
[]byte("buzz"),
}
for _, msg := range msgs {
_, err := ss.Write(msg)
require.NoError(t, err)
}
recentMessages := ss.GetLastFewLogs()
require.DeepEqual(t, msgs, recentMessages)
}