Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vendored fabric-config version and associated integration test #1265

Merged
merged 2 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
github.com/hashicorp/go-version v1.2.0
github.com/hyperledger/fabric-amcl v0.0.0-20200128223036-d1aa2665426a
github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed
github.com/hyperledger/fabric-config v0.0.0-20200507183426-92ce5d82acee
github.com/hyperledger/fabric-config v0.0.0-20200514142724-e1bf69d9f3fe
github.com/hyperledger/fabric-lib-go v1.0.0
github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ github.com/hyperledger/fabric-amcl v0.0.0-20200128223036-d1aa2665426a h1:HgdNn3U
github.com/hyperledger/fabric-amcl v0.0.0-20200128223036-d1aa2665426a/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE=
github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed h1:VNnrD/ilIUO9DDHQP/uioYSy1309rYy0Z1jf3GLNRIc=
github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc=
github.com/hyperledger/fabric-config v0.0.0-20200507183426-92ce5d82acee h1:boJpvFbqY+z2C5hx5eZIUnbIK3PpUlHCHTDkJ/isoXg=
github.com/hyperledger/fabric-config v0.0.0-20200507183426-92ce5d82acee/go.mod h1:aeDZ0moG/qKvwLjddcqYr8+58/oNaJy3HE0tI01546c=
github.com/hyperledger/fabric-config v0.0.0-20200514142724-e1bf69d9f3fe h1:Sr+vFM+P3dvuOL+BEo4ggmiFdvdKIcz3RGL41HEpAxQ=
github.com/hyperledger/fabric-config v0.0.0-20200514142724-e1bf69d9f3fe/go.mod h1:aeDZ0moG/qKvwLjddcqYr8+58/oNaJy3HE0tI01546c=
github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324=
github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc=
github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0=
Expand Down
16 changes: 10 additions & 6 deletions integration/configtx/configtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/onsi/gomega/gexec"
)

var _ = Describe("Config", func() {
var _ = Describe("ConfigTx", func() {
var (
client *docker.Client
testDir string
Expand Down Expand Up @@ -70,7 +70,7 @@ var _ = Describe("Config", func() {
os.RemoveAll(testDir)
})

It("creates channels and updates them using pkg/config", func() {
It("creates channels and updates them using fabric-config/configtx", func() {
orderer := network.Orderer("orderer")
testPeers := network.PeersWithChannel("testchannel")
org1peer0 := network.Peer("Org1", "peer0")
Expand Down Expand Up @@ -115,7 +115,9 @@ var _ = Describe("Config", func() {
}

channelID := "testchannel"
envelope, err := configtx.NewCreateChannelTx(channel, channelID)
createChannelUpdate, err := configtx.NewCreateChannelTx(channel, channelID)
Expect(err).NotTo(HaveOccurred())
envelope, err := configtx.NewEnvelope(createChannelUpdate)
Expect(err).NotTo(HaveOccurred())
envBytes, err := proto.Marshal(envelope)
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -149,7 +151,7 @@ var _ = Describe("Config", func() {

By("adding the anchor peer for " + peer.Organization)
host, port := peerHostPort(network, peer)
err = c.AddAnchorPeer(peer.Organization, configtx.Address{Host: host, Port: port})
err = c.Application().Organization(peer.Organization).AddAnchorPeer(configtx.Address{Host: host, Port: port})
Expect(err).NotTo(HaveOccurred())

By("computing the config update")
Expand All @@ -162,11 +164,13 @@ var _ = Describe("Config", func() {
PrivateKey: parsePeerPrivateKey(network, peer, "Admin"),
MSPID: network.Organization(peer.Organization).MSPID,
}
signature, err := signingIdentity.SignConfigUpdate(configUpdate)
signature, err := signingIdentity.CreateConfigSignature(configUpdate)
Expect(err).NotTo(HaveOccurred())

By("creating a signed config update envelope with the detached signature")
configUpdateEnvelope, err := signingIdentity.SignConfigUpdateEnvelope(configUpdate, signature)
configUpdateEnvelope, err := configtx.NewEnvelope(configUpdate, signature)
Expect(err).NotTo(HaveOccurred())
err = signingIdentity.SignEnvelope(configUpdateEnvelope)
Expect(err).NotTo(HaveOccurred())
configUpdateBytes, err := proto.Marshal(configUpdateEnvelope)
Expect(err).NotTo(HaveOccurred())
Expand Down
Loading