github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/orderer/consensus/cluster_status_test.go (about) 1 /* 2 Copyright IBM Corp. 2017 All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package consensus_test 8 9 import ( 10 "github.com/osdi23p228/fabric/orderer/common/types" 11 "testing" 12 13 "github.com/osdi23p228/fabric/orderer/consensus" 14 "github.com/stretchr/testify/assert" 15 ) 16 17 func TestStaticStatusReporter(t *testing.T) { 18 staticSR := &consensus.StaticStatusReporter{ 19 ClusterRelation: types.ClusterRelationNone, 20 Status: types.StatusActive, 21 } 22 23 var sr consensus.StatusReporter = staticSR // make sure it implements this interface 24 cRel, status := sr.StatusReport() 25 assert.Equal(t, types.ClusterRelationNone, cRel) 26 assert.Equal(t, types.StatusActive, status) 27 }