github.com/anjalikarhana/fabric@v2.1.1+incompatible/orderer/common/broadcast/broadcast_suite_test.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package broadcast_test 8 9 import ( 10 "testing" 11 12 ab "github.com/hyperledger/fabric-protos-go/orderer" 13 "github.com/hyperledger/fabric/common/metrics" 14 15 . "github.com/onsi/ginkgo" 16 . "github.com/onsi/gomega" 17 ) 18 19 //go:generate counterfeiter -o mock/ab_server.go --fake-name ABServer . abServer 20 type abServer interface { 21 ab.AtomicBroadcast_BroadcastServer 22 } 23 24 //go:generate counterfeiter -o mock/metrics_histogram.go --fake-name MetricsHistogram . metricsHistogram 25 type metricsHistogram interface { 26 metrics.Histogram 27 } 28 29 //go:generate counterfeiter -o mock/metrics_counter.go --fake-name MetricsCounter . metricsCounter 30 type metricsCounter interface { 31 metrics.Counter 32 } 33 34 //go:generate counterfeiter -o mock/metrics_provider.go --fake-name MetricsProvider . metricsProvider 35 type metricsProvider interface { 36 metrics.Provider 37 } 38 39 func TestBroadcast(t *testing.T) { 40 RegisterFailHandler(Fail) 41 RunSpecs(t, "Broadcast Suite") 42 }