github.com/fnagchunpeng/fabric@v2.1.1+incompatible/core/endorser/endorser_suite_test.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package endorser_test
     8  
     9  import (
    10  	"testing"
    11  
    12  	"github.com/hyperledger/fabric/core/endorser"
    13  	"github.com/hyperledger/fabric/core/ledger"
    14  	"github.com/hyperledger/fabric/msp"
    15  
    16  	. "github.com/onsi/ginkgo"
    17  	. "github.com/onsi/gomega"
    18  )
    19  
    20  //go:generate counterfeiter -o fake/support.go --fake-name Support . endorserSupport
    21  type endorserSupport interface {
    22  	endorser.Support
    23  }
    24  
    25  //go:generate counterfeiter -o fake/id_deserializer.go --fake-name IdentityDeserializer . identityDeserializer
    26  type identityDeserializer interface {
    27  	msp.IdentityDeserializer
    28  }
    29  
    30  //go:generate counterfeiter -o fake/identity.go --fake-name Identity . identity
    31  type identity interface {
    32  	msp.Identity
    33  }
    34  
    35  //go:generate counterfeiter -o fake/tx_simulator.go --fake-name TxSimulator . txSimulator
    36  type txSimulator interface {
    37  	ledger.TxSimulator
    38  }
    39  
    40  //go:generate counterfeiter -o fake/history_query_executor.go --fake-name HistoryQueryExecutor . historyQueryExecutor
    41  type historyQueryExecutor interface {
    42  	ledger.HistoryQueryExecutor
    43  }
    44  
    45  func TestEndorser(t *testing.T) {
    46  	RegisterFailHandler(Fail)
    47  	RunSpecs(t, "Endorser Suite")
    48  }