github.com/anjalikarhana/fabric@v2.1.1+incompatible/orderer/common/blockcutter/blockcutter_suite_test.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package blockcutter_test
     8  
     9  import (
    10  	"testing"
    11  
    12  	"github.com/hyperledger/fabric/common/channelconfig"
    13  	"github.com/hyperledger/fabric/common/metrics"
    14  	"github.com/hyperledger/fabric/orderer/common/blockcutter"
    15  
    16  	. "github.com/onsi/ginkgo"
    17  	. "github.com/onsi/gomega"
    18  )
    19  
    20  //go:generate counterfeiter -o mock/metrics_histogram.go --fake-name MetricsHistogram . metricsHistogram
    21  type metricsHistogram interface {
    22  	metrics.Histogram
    23  }
    24  
    25  //go:generate counterfeiter -o mock/metrics_provider.go --fake-name MetricsProvider . metricsProvider
    26  type metricsProvider interface {
    27  	metrics.Provider
    28  }
    29  
    30  //go:generate counterfeiter -o mock/config_fetcher.go --fake-name OrdererConfigFetcher . ordererConfigFetcher
    31  type ordererConfigFetcher interface {
    32  	blockcutter.OrdererConfigFetcher
    33  }
    34  
    35  //go:generate counterfeiter -o mock/orderer_config.go --fake-name OrdererConfig . ordererConfig
    36  type ordererConfig interface {
    37  	channelconfig.Orderer
    38  }
    39  
    40  func TestBlockcutter(t *testing.T) {
    41  	RegisterFailHandler(Fail)
    42  	RunSpecs(t, "Blockcutter Suite")
    43  }