mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
5a66807989
* 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>
24 lines
415 B
Go
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)
|
|
}
|