mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
a9a4bb9163
* move testutil * util pkg * build * gaz Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
24 lines
412 B
Go
24 lines
412 B
Go
package logs
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/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)
|
|
}
|