github.com/MetalBlockchain/metalgo@v1.11.9/snow/consensus/snowman/bootstrapper/noop_test.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package bootstrapper 5 6 import ( 7 "context" 8 "testing" 9 10 "github.com/stretchr/testify/require" 11 ) 12 13 func TestNoop(t *testing.T) { 14 require := require.New(t) 15 16 require.Empty(Noop.GetPeers(context.Background())) 17 18 require.NoError(Noop.RecordOpinion(context.Background(), nodeID0, nil)) 19 20 blkIDs, finalized := Noop.Result(context.Background()) 21 require.Empty(blkIDs) 22 require.False(finalized) 23 }