github.com/lzy4123/fabric@v2.1.1+incompatible/internal/configtxlator/integration/integration_suite_test.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package integration_test
     8  
     9  import (
    10  	"testing"
    11  
    12  	. "github.com/onsi/ginkgo"
    13  	. "github.com/onsi/gomega"
    14  	"github.com/onsi/gomega/gexec"
    15  )
    16  
    17  func TestIntegration(t *testing.T) {
    18  	RegisterFailHandler(Fail)
    19  	RunSpecs(t, "Integration Suite")
    20  }
    21  
    22  var configtxlatorPath string
    23  
    24  var _ = SynchronizedBeforeSuite(func() []byte {
    25  	configtxlatorPath, err := gexec.Build("github.com/hyperledger/fabric/cmd/configtxlator")
    26  	Expect(err).NotTo(HaveOccurred())
    27  
    28  	return []byte(configtxlatorPath)
    29  }, func(payload []byte) {
    30  	configtxlatorPath = string(payload)
    31  })
    32  
    33  var _ = SynchronizedAfterSuite(func() {
    34  }, func() {
    35  	gexec.CleanupBuildArtifacts()
    36  })