Skip to content

Commit

Permalink
[FAB-11066] Update stable version to 1.2.0
Browse files Browse the repository at this point in the history
Change-Id: I061c453456cec75f5f0d80a06b3e2e8ff7246eab
Signed-off-by: Troy Ronda <[email protected]>
  • Loading branch information
troyronda committed Jul 5, 2018
1 parent 5ac5226 commit 12fab60
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 98 deletions.
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ DOCKER_CMD ?= docker
DOCKER_COMPOSE_CMD ?= docker-compose

# Fabric versions used in the Makefile
FABRIC_STABLE_VERSION := 1.1.0
FABRIC_STABLE_VERSION_MINOR := 1.1
FABRIC_STABLE_VERSION := 1.2.0
FABRIC_STABLE_VERSION_MINOR := 1.2
FABRIC_STABLE_VERSION_MAJOR := 1
FABRIC_BASEIMAGE_STABLE_VERSION := 0.4.10

FABRIC_PRERELEASE_VERSION := 1.2.0-rc1
FABRIC_PREV_VERSION := 1.0.6
FABRIC_PRERELEASE_VERSION := 1.2.0
FABRIC_PREV_VERSION := 1.1.0
FABRIC_DEVSTABLE_VERSION_MINOR := 1.2
FABRIC_DEVSTABLE_VERSION_MAJOR := 1
FABRIC_PREV_VERSION_MINOR := 1.0
FABRIC_PREV_VERSION_MINOR := 1.1

# Build flags (overridable)
GO_LDFLAGS ?=
Expand Down Expand Up @@ -149,7 +149,7 @@ FABRIC_STABLE_PKCS11_INTTEST := true
FABRIC_STABLE_REVOKED_INTTEST := true
FABRIC_STABLE_EXPIRED_INTTEST := true
FABRIC_PREV_INTTEST := true
FABRIC_PRERELEASE_INTTEST := true
FABRIC_PRERELEASE_INTTEST := false
FABRIC_DEVSTABLE_INTTEST := false
endif

Expand Down Expand Up @@ -285,7 +285,8 @@ integration-tests-stable-peer-cert-expired: clean depend populate

.PHONY: integration-tests-stable-pkcs11
integration-tests-stable-pkcs11: clean depend populate build-softhsm2-image
@cd $(FIXTURE_DOCKERENV_PATH) && \
@. $(FIXTURE_DOCKERENV_PATH)/nomutualtls-env.sh && \
cd $(FIXTURE_DOCKERENV_PATH) && \
TEST_CHANGED_ONLY=true FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_STABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_STABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) $(DOCKER_COMPOSE_CMD) -f docker-compose.yaml -f docker-compose-pkcs11-test.yaml up --force-recreate --abort-on-container-exit
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "-f ./docker-compose.yaml -f ./docker-compose-pkcs11-test.yaml"

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ client:
### Retired versions
When the 'prev' code level is updated, the last tested fabric-sdk-go commit or tag is listed below.

- fabric v1.0.0 & fabric-ca v1.0.0
- fabric-sdk-go: 79b343ba
- fabric v1.0 & fabric-ca v1.0
- fabric-sdk-go: 5ac5226

### Running the test suite

Expand Down
2 changes: 0 additions & 2 deletions gometalinter.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"Deadline": "5m",
"Exclude": [
".*seekInfo can be .*proto.Message.*",
"^test/integration/msp/check_cert_attributes.go",
"^test/integration/msp/check_cert_ser_attributes_prev.go",
"^internal/github.com/",
"^third_party/"
],
Expand Down
13 changes: 9 additions & 4 deletions pkg/client/resmgmt/resmgmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import (
"fmt"
"net/http"
"os"
"path"
"strings"
"testing"
"time"

"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/retry"
"github.com/hyperledger/fabric-sdk-go/test/metadata"

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-sdk-go/pkg/common/errors/status"
Expand All @@ -39,11 +41,14 @@ import (
"github.com/stretchr/testify/assert"
)

var (
channelConfig = path.Join("../../../", metadata.ChannelConfigPath, "mychannel.tx")
)

const (
channelConfig = "../../../test/fixtures/fabric/v1.0/channel/mychannel.tx"
networkCfg = "../../../test/fixtures/config/config_test.yaml"
configPath = "../../core/config/testdata/config_test.yaml"
testAddress = "127.0.0.1:0"
networkCfg = "../../../test/fixtures/config/config_test.yaml"
configPath = "../../core/config/testdata/config_test.yaml"
testAddress = "127.0.0.1:0"
)

func withLocalContextProvider(provider context.LocalProvider) ClientOption {
Expand Down
20 changes: 9 additions & 11 deletions test/fixtures/dockerenv/.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ COMPOSE_PROJECT_NAME=fabsdkgo

FABRIC_DOCKER_REGISTRY=

FABRIC_FIXTURE_VERSION=v1.1
FABRIC_FIXTURE_VERSION=v1.2
FABRIC_CRYPTOCONFIG_VERSION=v1

FABRIC_CA_FIXTURE_TAG=1.1.0
FABRIC_ORDERER_FIXTURE_TAG=1.1.0
FABRIC_PEER_FIXTURE_TAG=1.1.0
FABRIC_BUILDER_FIXTURE_TAG=1.1.0
FABRIC_CA_FIXTURE_TAG=1.2.0
FABRIC_ORDERER_FIXTURE_TAG=1.2.0
FABRIC_PEER_FIXTURE_TAG=1.2.0
FABRIC_BUILDER_FIXTURE_TAG=1.2.0
FABRIC_COUCHDB_FIXTURE_TAG=0.4.10
FABRIC_BASEOS_FIXTURE_TAG=0.4.10
FABRIC_BASEIMAGE_FIXTURE_TAG=0.4.10
Expand All @@ -36,9 +36,7 @@ FABRIC_BUILDER_FIXTURE_IMAGE=hyperledger/fabric-ccenv
FABRIC_BASEOS_FIXTURE_IMAGE=hyperledger/fabric-baseos
FABRIC_BASEIMAGE_FIXTURE_IMAGE=hyperledger/fabric-baseimage


# Default orderer and peer configuration for mutual TLS
CORE_PEER_TLS_CLIENTAUTHREQUIRED=false
CORE_PEER_TLS_CLIENTROOTCAS_FILES=
ORDERER_GENERAL_TLS_CLIENTAUTHENABLED=false
ORDERER_GENERAL_TLS_CLIENTROOTCAS=
CORE_PEER_TLS_CLIENTAUTHREQUIRED=true
CORE_PEER_TLS_CLIENTROOTCAS_FILES=/etc/hyperledger/tls/peer/ca.crt /etc/hyperledger/mutual_tls/peer/client_sdk_go-ca_root.pem
ORDERER_GENERAL_TLS_CLIENTAUTHENABLED=true
ORDERER_GENERAL_TLS_CLIENTROOTCAS=[/etc/hyperledger/tls/orderer/ca.crt,/etc/hyperledger/mutual_tls/orderer/client_sdk_go-ca_root.pem]
12 changes: 1 addition & 11 deletions test/fixtures/dockerenv/devstable-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
# against the latest dev-stable target.

# Uses nexus registry (see https://nexus3.hyperledger.org/#browse/browse/components:docker.snapshot)
export ARCH=""
export ARCH_SEP=""

export FABRIC_FIXTURE_VERSION="v1.2"
export FABRIC_CRYPTOCONFIG_VERSION="v1"

Expand All @@ -25,11 +22,4 @@ export FABRIC_BUILDER_FIXTURE_TAG="stable"
export FABRIC_SDK_CLIENT_CRYPTOCONFIG_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config"
export FABRIC_SDK_CLIENT_ORDERERS_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"
export FABRIC_SDK_CLIENT_PEERS_PEER0_ORG1_EXAMPLE_COM_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"
export FABRIC_SDK_CLIENT_PEERS_PEER0_ORG2_EXAMPLE_COM_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem"

# override PEER and ORDERER configuration for mutual TLS
export CORE_PEER_TLS_CLIENTAUTHREQUIRED=true
export CORE_PEER_TLS_CLIENTROOTCAS_FILES="/etc/hyperledger/tls/peer/ca.crt /etc/hyperledger/mutual_tls/peer/client_sdk_go-ca_root.pem"
export ORDERER_GENERAL_TLS_CLIENTAUTHENABLED=true
export ORDERER_GENERAL_TLS_CLIENTROOTCAS="[/etc/hyperledger/tls/orderer/ca.crt,/etc/hyperledger/mutual_tls/orderer/client_sdk_go-ca_root.pem]"

export FABRIC_SDK_CLIENT_PEERS_PEER0_ORG2_EXAMPLE_COM_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem"
2 changes: 1 addition & 1 deletion test/fixtures/dockerenv/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ services:
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default
#comment out logging.driver in order to render the debug logs
logging:
driver: none
driver: none
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: peer node start
ports:
Expand Down
16 changes: 1 addition & 15 deletions test/fixtures/dockerenv/prerelease-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,8 @@ export FABRIC_ORDERER_FIXTURE_TAG="1.2.0-rc1"
export FABRIC_PEER_FIXTURE_TAG="1.2.0-rc1"
export FABRIC_BUILDER_FIXTURE_TAG="1.2.0-rc1"

export ARCH=""
export ARCH_SEP=""

# Using default BASSEOS image (until there is a compatibility issue)
# export FABRIC_BASEOS_FIXTURE_TAG="0.4.6"
# export FABRIC_BASEIMAGE_FIXTURE_TAG="0.4.6"
# export FABRIC_COUCHDB_FIXTURE_TAG="0.4.6"

# override SDK configuration that loads crypto-config
export FABRIC_SDK_CLIENT_CRYPTOCONFIG_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config"
export FABRIC_SDK_CLIENT_ORDERERS_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"
export FABRIC_SDK_CLIENT_PEERS_PEER0_ORG1_EXAMPLE_COM_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"
export FABRIC_SDK_CLIENT_PEERS_PEER0_ORG2_EXAMPLE_COM_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem"

# override PEER and ORDERER configuration for mutual TLS
export CORE_PEER_TLS_CLIENTAUTHREQUIRED=true
export CORE_PEER_TLS_CLIENTROOTCAS_FILES="/etc/hyperledger/tls/peer/ca.crt /etc/hyperledger/mutual_tls/peer/client_sdk_go-ca_root.pem"
export ORDERER_GENERAL_TLS_CLIENTAUTHENABLED=true
export ORDERER_GENERAL_TLS_CLIENTROOTCAS="[/etc/hyperledger/tls/orderer/ca.crt,/etc/hyperledger/mutual_tls/orderer/client_sdk_go-ca_root.pem]"
export FABRIC_SDK_CLIENT_PEERS_PEER0_ORG2_EXAMPLE_COM_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem"
18 changes: 5 additions & 13 deletions test/fixtures/dockerenv/prev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@

# This file contains environment overrides to enable testing
# against the latest pre-release target.
export FABRIC_FIXTURE_VERSION="v1.0"
export FABRIC_FIXTURE_VERSION="v1.1"
export FABRIC_CRYPTOCONFIG_VERSION="v1"

export FABRIC_CA_FIXTURE_TAG="1.0.6"
export FABRIC_ORDERER_FIXTURE_TAG="1.0.6"
export FABRIC_PEER_FIXTURE_TAG="1.0.6"
export FABRIC_BUILDER_FIXTURE_TAG="1.0.6"

# Using old style base OS arch tags for 1.0.x
export FABRIC_ARCH=${ARCH}
export FABRIC_BASEOS_FIXTURE_TAG="0.4.6"
export FABRIC_BASEIMAGE_FIXTURE_TAG="0.4.6"
export FABRIC_COUCHDB_FIXTURE_TAG="0.4.6"
export FABRIC_CA_FIXTURE_TAG="1.1.0"
export FABRIC_ORDERER_FIXTURE_TAG="1.1.0"
export FABRIC_PEER_FIXTURE_TAG="1.1.0"
export FABRIC_BUILDER_FIXTURE_TAG="1.1.0"

# override configuration that loads crypto-config
export FABRIC_SDK_CLIENT_CRYPTOCONFIG_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config"
export FABRIC_SDK_CLIENT_ORDERERS_TLSCACERTS_PATH='${GOPATH}'"/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/fabric/${FABRIC_CRYPTOCONFIG_VERSION}/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"

export FABRIC_SDK_CLIENT_EVENTSERVICE_TYPE=eventhub
1 change: 0 additions & 1 deletion test/integration/fab/discoveryclient_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// +build !prev
// +build !stable

/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
Expand Down
4 changes: 1 addition & 3 deletions test/integration/msp/check_cert_attributes.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !prev

/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
Expand All @@ -19,7 +17,7 @@ import (
"github.com/stretchr/testify/require"
)

func checkCertAttributes(t *testing.T, certBytes []byte, expected []msp.Attribute) {
func checkCertAttributes(t *testing.T, certBytes []byte, expected []msp.Attribute) { // nolint: deadcode
decoded, _ := pem.Decode(certBytes)
if decoded == nil {
t.Fatal("Failed cert decoding")
Expand Down
19 changes: 0 additions & 19 deletions test/integration/msp/check_cert_ser_attributes_prev.go

This file was deleted.

2 changes: 0 additions & 2 deletions test/integration/msp/identity_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !prev

/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion test/integration/orgs/multiple_orgs_minconfig_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// +build !prev
// +build !stable

/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
Expand Down
2 changes: 0 additions & 2 deletions test/integration/sdk/events_client_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !prev

/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion test/integration/sdk/fabricselection_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// +build !prev
// +build !stable

/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
Expand Down
1 change: 0 additions & 1 deletion test/integration/sdk/sdk_dyndiscovery_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// +build !prev
// +build !stable

/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion test/metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0
package metadata

// ChannelConfigPath is the relative path to the generated channel artifacts directory
var ChannelConfigPath = "test/fixtures/fabric/v1.1/channel"
var ChannelConfigPath = "test/fixtures/fabric/v1.2/channel"

// CryptoConfigPath is the relative path to the generated crypto config directory
var CryptoConfigPath = "test/fixtures/fabric/v1/crypto-config"
2 changes: 1 addition & 1 deletion test/scripts/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GO_CMD="${GO_CMD:-go}"
GOPATH="${GOPATH:-$HOME/go}"
FABRIC_SDKGO_CODELEVEL_TAG="${FABRIC_SDKGO_CODELEVEL_TAG:-stable}"
FABRIC_CRYPTOCONFIG_VERSION="${FABRIC_CRYPTOCONFIG_VERSION:-v1}"
FABRIC_FIXTURE_VERSION="${FABRIC_FIXTURE_VERSION:-v1.1}"
FABRIC_FIXTURE_VERSION="${FABRIC_FIXTURE_VERSION:-v1.2}"
CONFIG_FILE="${CONFIG_FILE:-config_test.yaml}"
TEST_LOCAL="${TEST_LOCAL:-false}"
TEST_CHANGED_ONLY="${TEST_CHANGED_ONLY:-false}"
Expand Down

0 comments on commit 12fab60

Please sign in to comment.