Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 4db5c82

Browse files
committed
[FABG-881] Update to test target to 1.4.2 and Go 1.12
This change updates the docker environment target to Fabric 1.4.2. The Go version is also updated to 1.12. golangci-lint is also updated to 1.17.1 and lint warnings are resolved. Change-Id: I42206dce5315791619922d94400eda69f8f5730e Signed-off-by: Troy Ronda <troy@troyronda.com>
1 parent f264087 commit 4db5c82

File tree

11 files changed

+29
-21
lines changed

11 files changed

+29
-21
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DOCKER_CMD ?= docker
2525
DOCKER_COMPOSE_CMD ?= docker-compose
2626

2727
# Fabric versions used in the Makefile
28-
FABRIC_STABLE_VERSION := 1.4.1
28+
FABRIC_STABLE_VERSION := 1.4.2
2929
FABRIC_STABLE_VERSION_MINOR := 1.4
3030
FABRIC_STABLE_VERSION_MAJOR := 1
3131

@@ -48,7 +48,7 @@ FABRIC_SDKGO_TEST_CHANGED ?= false
4848
FABRIC_SDKGO_TESTRUN_ID ?= $(shell date +'%Y%m%d%H%M%S')
4949

5050
# Dev tool versions (overridable)
51-
GOLANGCI_LINT_VER ?= v1.16.0
51+
GOLANGCI_LINT_VER ?= v1.17.1
5252

5353
# Fabric tool versions (overridable)
5454
FABRIC_TOOLS_VERSION ?= $(FABRIC_STABLE_VERSION)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You're good to go, happy coding! Check out the examples for usage demonstrations
3737
### Current Compatibility
3838
The SDK's integration tests run against three tagged Fabric versions:
3939
- prev (currently v1.3.0)
40-
- stable (currently v1.4.0)
40+
- stable (currently v1.4.2)
4141
- prerelease (currently disabled)
4242

4343
Additionally for development purposes integration tests also run against the devstable Fabric version as needed.
@@ -94,7 +94,7 @@ If you want to contribute to the Go SDK, please run the test suite and submit pa
9494

9595
You need:
9696

97-
- Go 1.11
97+
- Go 1.12
9898
- Make
9999
- Docker
100100
- Docker Compose

ci.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# SPDX-License-Identifier: Apache-2.0
55
#
66

7-
GO_VER=1.11.5
8-
GO_MIN_VER=1.11
9-
GO_MAX_VER=1.12.3
7+
GO_VER=1.12.5
8+
GO_MIN_VER=1.12
9+
GO_MAX_VER=1.12.7

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
3838
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
3939
github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324=
4040
github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc=
41+
github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric v0.0.0-20190524192706-bfae339c63bf h1:ETZhEsVon+yTYk2N3Imw4ItPonDoiWXEb2i0kdOl4OU=
4142
github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric v0.0.0-20190524192706-bfae339c63bf/go.mod h1:yzDA0nf/SiINYnTVcFKQvPM212O1BVriPF2XZLZybbg=
4243
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
4344
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=

pkg/fab/resource/configtx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func CreateGenesisBlock(config *genesisconfig.Profile, channelID string) ([]byte
4848
return protoutil.Marshal(genesisBlock)
4949
}
5050

51-
// CreateGenesisBlock creates a genesis block for a channel
51+
// CreateGenesisBlockForOrderer creates a genesis block for a channel
5252
func CreateGenesisBlockForOrderer(config *genesisconfig.Profile, channelID string) ([]byte, error) {
5353
if config.Consortiums == nil {
5454
return nil, errors.Errorf("Genesis block does not contain a consortiums group definition. This block cannot be used for orderer bootstrap.")

pkg/fab/resource/configtxmsp.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ import (
2121
const (
2222
cacerts = "cacerts"
2323
admincerts = "admincerts"
24-
signcerts = "signcerts"
25-
keystore = "keystore"
2624
intermediatecerts = "intermediatecerts"
2725
crlsfolder = "crls"
28-
configfilename = "config.yaml"
2926
tlscacerts = "tlscacerts"
3027
tlsintermediatecerts = "tlsintermediatecerts"
3128
)
@@ -58,17 +55,17 @@ func GenerateMspDir(mspDir string, config *msp.MSPConfig) error {
5855
{crlsfolder, cfg.RevocationList},
5956
}
6057
for _, d := range defs {
61-
err := generateCertDir(filepath.Join(mspDir, d.dir), d.certs)
62-
if err != nil {
63-
return err
58+
errGen := generateCertDir(filepath.Join(mspDir, d.dir), d.certs)
59+
if errGen != nil {
60+
return errGen
6461
}
6562
}
6663

6764
return err
6865
}
6966

7067
func generateCertDir(certDir string, certs [][]byte) error {
71-
err := os.MkdirAll(certDir, 0755)
68+
err := os.MkdirAll(certDir, 0750)
7269
if err != nil {
7370
return err
7471
}
@@ -77,7 +74,7 @@ func generateCertDir(certDir string, certs [][]byte) error {
7774
}
7875
for counter, certBytes := range certs {
7976
fileName := filepath.Join(certDir, "cert"+fmt.Sprintf("%d", counter)+".pem")
80-
err = ioutil.WriteFile(fileName, certBytes, 0644)
77+
err = ioutil.WriteFile(fileName, certBytes, 0640)
8178
if err != nil {
8279
return err
8380
}

test/fixtures/dockerenv/.env

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ FABRIC_BASE_DOCKER_REGISTRY=
2121
FABRIC_FIXTURE_VERSION=v1.4
2222
FABRIC_CRYPTOCONFIG_VERSION=v1
2323

24-
FABRIC_CA_FIXTURE_TAG=1.4.1
25-
FABRIC_ORDERER_FIXTURE_TAG=1.4.1
26-
FABRIC_PEER_FIXTURE_TAG=1.4.1
27-
FABRIC_BUILDER_FIXTURE_TAG=1.4.1
24+
FABRIC_CA_FIXTURE_TAG=1.4.2
25+
FABRIC_ORDERER_FIXTURE_TAG=1.4.2
26+
FABRIC_PEER_FIXTURE_TAG=1.4.2
27+
FABRIC_BUILDER_FIXTURE_TAG=1.4.2
2828
FABRIC_COUCHDB_FIXTURE_TAG=0.4.15
2929
FABRIC_BASEOS_FIXTURE_TAG=0.4.15
3030
FABRIC_BASEIMAGE_FIXTURE_TAG=0.4.15
@@ -51,4 +51,4 @@ ORDERER_GENERAL_TLS_CLIENTROOTCAS=[/etc/hyperledger/tls/orderer/ca.crt,/etc/hype
5151

5252
# set by crypto-config env.sh
5353
ORG1CA1_FABRIC_CA_SERVER_CA_KEYFILE=
54-
ORG2CA1_FABRIC_CA_SERVER_CA_KEYFILE=
54+
ORG2CA1_FABRIC_CA_SERVER_CA_KEYFILE=

test/fixtures/testdata/src/github.com/example_cc/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
github.com/golang/protobuf v1.3.1 // indirect
1111
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
1212
github.com/hyperledger/fabric v1.4.0
13+
github.com/hyperledger/fabric-amcl v0.0.0-20181230093703-5ccba6eab8d6 // indirect
1314
github.com/miekg/pkcs11 v0.0.0-20190401114359-553cfdd26aaa // indirect
1415
github.com/onsi/gomega v1.5.0 // indirect
1516
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect

test/fixtures/testdata/src/github.com/example_cc/go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
4646
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
4747
github.com/hyperledger/fabric v1.4.0 h1:AiOUXysOwh4BmSLZaNzw6ZocZl0uByekPcc+g3PiXH4=
4848
github.com/hyperledger/fabric v1.4.0/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0=
49+
github.com/hyperledger/fabric-amcl v0.0.0-20181230093703-5ccba6eab8d6 h1:URjjUy3G6zNoODRpSy7FFzJyXh3J4+O5NJPgLY9lWT8=
50+
github.com/hyperledger/fabric-amcl v0.0.0-20181230093703-5ccba6eab8d6/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE=
4951
github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd h1:anPrsicrIi2ColgWTVPk+TrN42hJIWlfPHSBP9S0ZkM=
5052
github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84=
5153
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
@@ -101,9 +103,11 @@ go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
101103
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
102104
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
103105
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
106+
golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc h1:F5tKCVGp+MUAHhKp5MZtGqAlGX3+oCsiL1Q629FL90M=
104107
golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
105108
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
106109
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
110+
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
107111
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
108112
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
109113
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

test/fixtures/testdata/src/github.com/example_pvt_cc/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ require (
1010
github.com/golang/protobuf v1.3.1 // indirect
1111
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
1212
github.com/hyperledger/fabric v1.4.0
13+
github.com/hyperledger/fabric-amcl v0.0.0-20181230093703-5ccba6eab8d6 // indirect
1314
github.com/miekg/pkcs11 v0.0.0-20190401114359-553cfdd26aaa // indirect
1415
github.com/onsi/gomega v1.5.0 // indirect
1516
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect

0 commit comments

Comments
 (0)