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

WIP Chain APIs for pkg/configtx orderer, application, consortium, and channel operations #1166

Closed
wants to merge 4 commits into from
Closed
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
6 changes: 3 additions & 3 deletions integration/configtx/configtx_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
. "github.com/onsi/gomega"
)

func TestConfig(t *testing.T) {
func TestConfigTx(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Config Suite")
RunSpecs(t, "ConfigTx Suite")
}

var (
Expand Down Expand Up @@ -46,5 +46,5 @@ var _ = SynchronizedAfterSuite(func() {
})

func StartPort() int {
return integration.ConfigBasePort.StartPortForNode()
return integration.ConfigTxBasePort.StartPortForNode()
}
10 changes: 5 additions & 5 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 All @@ -39,7 +39,7 @@ var _ = Describe("Config", func() {

BeforeEach(func() {
var err error
testDir, err = ioutil.TempDir("", "config")
testDir, err = ioutil.TempDir("", "configtx")
Expect(err).NotTo(HaveOccurred())

client, err = docker.NewClientFromEnv()
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 pkg/configtx", func() {
orderer := network.Orderer("orderer")
testPeers := network.PeersWithChannel("testchannel")
org1peer0 := network.Peer("Org1", "peer0")
Expand Down Expand Up @@ -149,7 +149,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.UpdatedConfig().Application().Organization(peer.Organization).AddAnchorPeer(configtx.Address{Host: host, Port: port})
Expect(err).NotTo(HaveOccurred())

By("computing the config update")
Expand Down Expand Up @@ -195,7 +195,7 @@ var _ = Describe("Config", func() {

By("ensuring the active channel config matches the submitted config")
finalChannelConfig := nwo.GetConfig(network, peer, orderer, "testchannel")
Expect(c.UpdatedConfig()).To(Equal(finalChannelConfig))
Expect(c.UpdatedConfig().Config).To(Equal(finalChannelConfig))
}
})
})
Expand Down
2 changes: 1 addition & 1 deletion integration/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
)

const (
ConfigBasePort TestPortRange = basePort + portsPerSuite*iota
ConfigTxBasePort TestPortRange = basePort + portsPerSuite*iota
DiscoveryBasePort
E2EBasePort
GossipBasePort
Expand Down
Loading