Skip to content

Commit

Permalink
[FABG-850] Remove vendor populate during tests
Browse files Browse the repository at this point in the history
The vendor populate step is removed during testing.

The test chaincodes and chaincoded now rely on go modules
for their vendoring.

Change-Id: I614b054c041e5d0ff0a9cd94585749a044d444b8
Signed-off-by: Troy Ronda <troy@troyronda.com>
  • Loading branch information
troyronda committed Apr 8, 2019
1 parent 5b5ef5e commit f1fd02a
Show file tree
Hide file tree
Showing 12 changed files with 410 additions and 127 deletions.
12 changes: 2 additions & 10 deletions Makefile
Expand Up @@ -44,7 +44,6 @@ GO_TESTFLAGS_UNIT ?= $(GO_TESTFLAGS)
GO_TESTFLAGS_INTEGRATION ?= $(GO_TESTFLAGS) -failfast
FABRIC_SDK_EXPERIMENTAL ?= true
FABRIC_SDK_EXTRA_GO_TAGS ?=
FABRIC_SDK_POPULATE_VENDOR ?= true
FABRIC_SDK_CHAINCODED ?= false
FABRIC_SDKGO_TEST_CHANGED ?= false
FABRIC_SDKGO_TESTRUN_ID ?= $(shell date +'%Y%m%d%H%M%S')
Expand Down Expand Up @@ -197,7 +196,6 @@ endif
# Detect subtarget execution
ifdef FABRIC_SDKGO_SUBTARGET
export FABRIC_SDKGO_DEPEND_INSTALL=false
FABRIC_SDK_POPULATE_VENDOR := false
endif

FABRIC_ARCH := $(ARCH)
Expand Down Expand Up @@ -584,7 +582,7 @@ populate: populate-vendor populate-fixtures-stable

.PHONY: populate-vendor
populate-vendor:
@$(TEST_SCRIPTS_PATH)/populate-vendor.sh -f
@go mod vendor

.PHONY: populate-fixtures-stable
populate-fixtures-stable:
Expand All @@ -594,13 +592,7 @@ populate-fixtures-stable:
$(TEST_SCRIPTS_PATH)/populate-fixtures.sh -f

.PHONY: populate-noforce
populate-noforce: populate-vendor-noforce populate-fixtures-stable-noforce

.PHONY: populate-vendor-noforce
populate-vendor-noforce:
ifeq ($(FABRIC_SDK_POPULATE_VENDOR),true)
@$(TEST_SCRIPTS_PATH)/populate-vendor.sh
endif
populate-noforce: populate-fixtures-stable-noforce

.PHONY: populate-fixtures-stable-noforce
populate-fixtures-stable-noforce:
Expand Down
5 changes: 5 additions & 0 deletions scripts/_go/src/chaincoded/go.mod
@@ -0,0 +1,5 @@
// Copyright SecureKey Technologies Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0

module chaincoded
Empty file.
2 changes: 2 additions & 0 deletions test/fixtures/dockerenv/docker-compose-chaincoded.yaml
Expand Up @@ -28,7 +28,9 @@ services:
- DOCKER_HOST=http://dockerd.example.com:2375
- CHAINCODED_VERBOSE
- CORE_CHAINCODE_LOGGING_LEVEL
- GO111MODULE
volumes:
- ${GOPATH}/pkg/mod:/opt/gopath/pkg/mod
- ../../../scripts/_go/src/chaincoded:/opt/gopath/src/chaincoded
- ../../../:/opt/gopath/src/github.com/hyperledger/fabric-sdk-go
- ../../../test/fixtures/testdata/src/github.com/example_cc:/opt/gopath/src/github.com/example_cc
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/dockerenv/docker-compose-negative.yaml
Expand Up @@ -19,7 +19,9 @@ services:
- FABRIC_SDK_CLIENT_EVENTSERVICE_TYPE
- TEST_CHANGED_ONLY
- CORE_VM_ENDPOINT
- GO111MODULE
volumes:
- ${GOPATH}/pkg/mod:/opt/gopath/pkg/mod
- ../../../:/opt/gopath/src/github.com/hyperledger/fabric-sdk-go
command: /opt/gopath/src/github.com/hyperledger/fabric-sdk-go/test/scripts/negative.sh
depends_on:
Expand Down
28 changes: 28 additions & 0 deletions test/fixtures/testdata/src/github.com/example_cc/go.mod
@@ -0,0 +1,28 @@
// Copyright SecureKey Technologies Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0

module github.com/example_cc

require (
github.com/Knetic/govaluate v3.0.0+incompatible // indirect
github.com/Shopify/sarama v1.21.0 // indirect
github.com/fsouza/go-dockerclient v1.3.6 // indirect
github.com/golang/protobuf v1.3.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/hashicorp/go-version v1.1.0 // indirect
github.com/hyperledger/fabric v1.4.0
github.com/hyperledger/fabric-amcl v0.0.0-20181230093703-5ccba6eab8d6 // indirect
github.com/miekg/pkcs11 v0.0.0-20190401114359-553cfdd26aaa // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
github.com/spf13/viper v1.3.2 // indirect
github.com/stretchr/testify v1.3.0 // indirect
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 // indirect
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
google.golang.org/grpc v1.19.1 // indirect
)
168 changes: 168 additions & 0 deletions test/fixtures/testdata/src/github.com/example_cc/go.sum

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions test/fixtures/testdata/src/github.com/example_pvt_cc/go.mod
@@ -0,0 +1,28 @@
// Copyright SecureKey Technologies Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0

module github.com/example_pvt_cc

require (
github.com/Knetic/govaluate v3.0.0+incompatible // indirect
github.com/Shopify/sarama v1.21.0 // indirect
github.com/fsouza/go-dockerclient v1.3.6 // indirect
github.com/golang/protobuf v1.3.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/hashicorp/go-version v1.1.0 // indirect
github.com/hyperledger/fabric v1.4.0
github.com/hyperledger/fabric-amcl v0.0.0-20181230093703-5ccba6eab8d6 // indirect
github.com/miekg/pkcs11 v0.0.0-20190401114359-553cfdd26aaa // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
github.com/spf13/viper v1.3.2 // indirect
github.com/stretchr/testify v1.3.0 // indirect
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1 // indirect
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 // indirect
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
google.golang.org/grpc v1.19.1 // indirect
)

0 comments on commit f1fd02a

Please sign in to comment.