Skip to content
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
3 changes: 1 addition & 2 deletions integration/configtx/configtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
docker "github.com/fsouza/go-dockerclient"
"github.com/hyperledger/fabric-config/configtx"
"github.com/hyperledger/fabric-protos-go-apiv2/common"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/ordererclient"
. "github.com/hyperledger/fabric/internal/test"
Expand Down Expand Up @@ -83,7 +82,7 @@ var _ = Describe("ConfigTx", func() {
orderer := network.Orderer("orderer")

By("joining all peers to the channel")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

By("getting the current channel config")
org2peer0 := network.Peer("Org2", "peer0")
Expand Down
3 changes: 1 addition & 2 deletions integration/devmode/devmode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"time"

docker "github.com/fsouza/go-dockerclient"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -100,7 +99,7 @@ var _ = Describe("Devmode", func() {
orderer := network.Orderer("orderer")

By("setting up the channel")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

By("enabling V2_0 application capabilities")
nwo.EnableCapabilities(network, channelName, "Application", "V2_0", orderer, org1peer0)
Expand Down
5 changes: 2 additions & 3 deletions integration/discovery/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/hyperledger/fabric-protos-go-apiv2/discovery"
pm "github.com/hyperledger/fabric-protos-go-apiv2/msp"
"github.com/hyperledger/fabric/common/policydsl"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
. "github.com/hyperledger/fabric/internal/test"
Expand Down Expand Up @@ -100,7 +99,7 @@ var _ = Describe("DiscoveryService", func() {
peerProcesses = append(peerProcesses, peerProcess)

orderer = network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

org1Peer0 = network.Peer("Org1", "peer0")
org2Peer0 = network.Peer("Org2", "peer0")
Expand Down Expand Up @@ -226,7 +225,7 @@ var _ = Describe("DiscoveryService", func() {
peerProcesses = append(peerProcesses, peerProcess)

orderer = network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

org1Peer0 = network.Peer("Org1", "peer0")
org2Peer0 = network.Peer("Org2", "peer0")
Expand Down
3 changes: 1 addition & 2 deletions integration/e2e/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/hyperledger/fabric-protos-go-apiv2/common"
pb "github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/hyperledger/fabric/core/aclmgmt/resources"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
"github.com/hyperledger/fabric/protoutil"
Expand Down Expand Up @@ -69,7 +68,7 @@ var _ = Describe("EndToEndACL", func() {
org1Peer0 = network.Peer("Org1", "peer0")
org2Peer0 = network.Peer("Org2", "peer0")

channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
})

AfterEach(func() {
Expand Down
3 changes: 1 addition & 2 deletions integration/e2e/chaincode_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

"github.com/hyperledger/fabric/common/crypto/tlsgen"
"github.com/hyperledger/fabric/core/container/externalbuilder"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -68,7 +67,7 @@ var _ = Describe("ChaincodeAsExternalServer", func() {
// Setup the network
ordererRunner, ordererProcess, peerProcess = network.StartSingleOrdererNetwork("orderer")

channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", network.Orderer("orderer"), ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", network.Orderer("orderer"), ordererRunner)

nwo.EnableCapabilities(
network,
Expand Down
37 changes: 18 additions & 19 deletions integration/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
docker "github.com/fsouza/go-dockerclient"
"github.com/hyperledger/fabric-lib-go/healthz"
"github.com/hyperledger/fabric-protos-go-apiv2/orderer/etcdraft"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
"github.com/hyperledger/fabric/integration/nwo/fabricconfig"
Expand Down Expand Up @@ -168,13 +167,13 @@ var _ = Describe("EndToEnd", func() {
})
Expect(err).NotTo(HaveOccurred())
Eventually(sess).Should(gexec.Exit(0))
var channelList channelparticipation.ChannelList
var channelList nwo.ChannelList
err = json.Unmarshal(sess.Out.Contents(), &channelList)
Expect(err).NotTo(HaveOccurred())
Expect(channelList).To(Equal(channelparticipation.ChannelList{}))
Expect(channelList).To(Equal(nwo.ChannelList{}))

By("setting up the channel")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

By("listing channels with osnadmin")
sess, err = network.Osnadmin(commands.ChannelList{
Expand All @@ -187,8 +186,8 @@ var _ = Describe("EndToEnd", func() {
Eventually(sess).Should(gexec.Exit(0))
err = json.Unmarshal(sess.Out.Contents(), &channelList)
Expect(err).NotTo(HaveOccurred())
Expect(channelList).To(Equal(channelparticipation.ChannelList{
Channels: []channelparticipation.ChannelInfoShort{{
Expect(channelList).To(Equal(nwo.ChannelList{
Channels: []nwo.ChannelInfoShort{{
Name: "testchannel",
URL: "/participation/v1/channels/testchannel",
}},
Expand Down Expand Up @@ -242,7 +241,7 @@ var _ = Describe("EndToEnd", func() {
CheckOrdererStatsdMetrics("ordererorg_orderer", metricsReader, 2*metricsWriteInterval)

By("setting up another channel from a the same profile")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "another-testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "another-testchannel", orderer, ordererRunner)

By("listing channels with osnadmin")
sess, err = network.Osnadmin(commands.ChannelList{
Expand All @@ -258,8 +257,8 @@ var _ = Describe("EndToEnd", func() {
sort.Slice(channelList.Channels, func(i, j int) bool {
return channelList.Channels[i].Name < channelList.Channels[j].Name
})
Expect(channelList).To(Equal(channelparticipation.ChannelList{
Channels: []channelparticipation.ChannelInfoShort{
Expect(channelList).To(Equal(nwo.ChannelList{
Channels: []nwo.ChannelInfoShort{
{
Name: "another-testchannel",
URL: "/participation/v1/channels/another-testchannel",
Expand Down Expand Up @@ -319,10 +318,10 @@ var _ = Describe("EndToEnd", func() {
orderer := network.Orderer("orderer")

By("setting up the channel")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

cl := channelparticipation.List(network, orderer)
channelparticipation.ChannelListMatcher(cl, []string{"testchannel"})
cl := nwo.List(network, orderer)
nwo.ChannelListMatcher(cl, []string{"testchannel"})

nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0"))

Expand Down Expand Up @@ -446,18 +445,18 @@ var _ = Describe("EndToEnd", func() {
orderer := network.Orderer("orderer")

By("Create first channel and deploy the chaincode")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0"))
nwo.DeployChaincode(network, "testchannel", orderer, chaincode)
peer := network.Peer("Org1", "peer0")
RunQueryInvokeQuery(network, orderer, peer, "testchannel")

By("Create second channel and deploy chaincode")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel2", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel2", orderer, ordererRunner)

cl := channelparticipation.List(network, orderer)
channelparticipation.ChannelListMatcher(cl, []string{"testchannel", "testchannel2"})
cl := nwo.List(network, orderer)
nwo.ChannelListMatcher(cl, []string{"testchannel", "testchannel2"})

nwo.EnableCapabilities(network, "testchannel2", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0"))
peers := network.PeersWithChannel("testchannel2")
Expand Down Expand Up @@ -532,7 +531,7 @@ var _ = Describe("EndToEnd", func() {

It("creates and updates channel", func() {
orderer := network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

// The below call waits for the config update to commit on the peer, so
// it will fail if the orderer addresses are wrong.
Expand Down Expand Up @@ -568,7 +567,7 @@ var _ = Describe("EndToEnd", func() {
orderer := network.Orderer("orderer")

By("creating and joining channels")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

By("enabling new lifecycle capabilities")
nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0"))
Expand Down Expand Up @@ -658,7 +657,7 @@ var _ = Describe("EndToEnd", func() {
orderer := network.Orderer("orderer")

By("creating and joining channels")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

By("enabling new lifecycle capabilities")
nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0"))
Expand Down
3 changes: 1 addition & 2 deletions integration/e2e/filter_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/hyperledger/fabric-protos-go-apiv2/common"
"github.com/hyperledger/fabric-protos-go-apiv2/gateway"
"github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/protoutil"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -92,7 +91,7 @@ var _ = Describe("FilterProposalTimeWindow", func() {
orderer := network.Orderer("orderer")

By("setting up the channel")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

By("enabling new lifecycle capabilities")
nwo.EnableCapabilities(network, "testchannel", "Application", "V2_5", orderer, network.Peer("Org1", "peer0"), network.Peer("Org2", "peer0"))
Expand Down
7 changes: 3 additions & 4 deletions integration/e2e/write_batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"syscall"

docker "github.com/fsouza/go-dockerclient"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -77,7 +76,7 @@ var _ = Describe("Network", func() {

It("deploys and executes experiment bench", func() {
orderer := network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
peer := network.Peer("Org1", "peer0")

chaincode := nwo.Chaincode{
Expand Down Expand Up @@ -160,7 +159,7 @@ var _ = Describe("Network", func() {

It("put private data for error", func() {
orderer := network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
peer := network.Peer("Org1", "peer0")

chaincode := nwo.Chaincode{
Expand Down Expand Up @@ -235,7 +234,7 @@ var _ = Describe("Network", func() {

It("deploys and executes experiment bench", func() {
orderer := network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
peer := network.Peer("Org1", "peer0")

chaincode := nwo.Chaincode{
Expand Down
3 changes: 1 addition & 2 deletions integration/gateway/endorsing_orgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
docker "github.com/fsouza/go-dockerclient"
"github.com/hyperledger/fabric-protos-go-apiv2/gateway"
"github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
. "github.com/hyperledger/fabric/internal/test"
"github.com/hyperledger/fabric/protoutil"
Expand Down Expand Up @@ -55,7 +54,7 @@ var _ = Describe("GatewayService with endorsing orgs", func() {
ordererRunner, ordererProcess, peerProcess = network.StartSingleOrdererNetwork("orderer")

orderer = network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

network.VerifyMembership(
network.PeersWithChannel("testchannel"),
Expand Down
7 changes: 3 additions & 4 deletions integration/gateway/gateway_bft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/hyperledger/fabric-protos-go-apiv2/common"
"github.com/hyperledger/fabric-protos-go-apiv2/gateway"
"github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -374,7 +373,7 @@ func joinChannel(network *nwo.Network, channel string) {
err = proto.Unmarshal(genesisBlockBytes, genesisBlock)
Expect(err).NotTo(HaveOccurred())

expectedChannelInfoPT := channelparticipation.ChannelInfo{
expectedChannelInfoPT := nwo.ChannelInfo{
Name: channel,
URL: "/participation/v1/channels/" + channel,
Status: "active",
Expand All @@ -384,8 +383,8 @@ func joinChannel(network *nwo.Network, channel string) {

for _, o := range network.Orderers {
By("joining " + o.Name + " to channel as a consenter")
channelparticipation.Join(network, o, channel, genesisBlock, expectedChannelInfoPT)
channelInfo := channelparticipation.ListOne(network, o, channel)
nwo.Join(network, o, channel, genesisBlock, expectedChannelInfoPT)
channelInfo := nwo.ListOne(network, o, channel)
Expect(channelInfo).To(Equal(expectedChannelInfoPT))
}
}
3 changes: 1 addition & 2 deletions integration/gateway/gateway_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
docker "github.com/fsouza/go-dockerclient"
"github.com/hyperledger/fabric-protos-go-apiv2/gateway"
"github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/protoutil"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -62,7 +61,7 @@ var _ = Describe("GatewayService with endorser discovery", func() {
ordererRunner, ordererProcess, peerProcess = network.StartSingleOrdererNetwork("orderer")

orderer = network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

network.VerifyMembership(
network.PeersWithChannel("testchannel"),
Expand Down
3 changes: 1 addition & 2 deletions integration/gateway/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/hyperledger/fabric-protos-go-apiv2/orderer"
"github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/hyperledger/fabric-protos-go-apiv2/peer/lifecycle"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
. "github.com/hyperledger/fabric/internal/test"
"github.com/hyperledger/fabric/protoutil"
Expand Down Expand Up @@ -107,7 +106,7 @@ var _ = Describe("GatewayService basic", func() {

By("setting up the channel")
orderer := network.Orderer("orderer")
channelparticipation.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)
nwo.JoinOrdererJoinPeersAppChannel(network, "testchannel", orderer, ordererRunner)

network.VerifyMembership(
network.PeersWithChannel("testchannel"),
Expand Down
9 changes: 4 additions & 5 deletions integration/gossip/gossip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"time"

docker "github.com/fsouza/go-dockerclient"
"github.com/hyperledger/fabric/integration/channelparticipation"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -127,7 +126,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() {
By("bringing up all four peers")
startPeers(nwprocs, false, peer0Org1, peer1Org1, peer0Org2, peer1Org2)

channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)
nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)

By("joining all peers to channel")
network.JoinChannel(channelName, orderer, peer0Org1, peer1Org1, peer0Org2, peer1Org2)
Expand Down Expand Up @@ -239,7 +238,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() {
startPeers(nwprocs, false, peer0Org1, peer1Org1)

By("creating and joining a channel")
channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)
nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)

network.JoinChannel(channelName, orderer, peer0Org1, peer1Org1)

Expand Down Expand Up @@ -272,7 +271,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() {
startPeers(nwprocs, false, peer0Org1, peer1Org1, peer0Org2, peer1Org2)

By("creating and joining a channel")
channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)
nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)
network.JoinChannel(channelName, orderer, peer0Org1, peer1Org1, peer0Org2, peer1Org2)

By("verifying membership on peer1Org1")
Expand Down Expand Up @@ -305,7 +304,7 @@ var _ = Describe("Gossip State Transfer and Membership", func() {
By("bringing up a peer in each organization")
startPeers(nwprocs, false, peer0Org1, peer0Org2)

channelparticipation.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)
nwo.JoinOrdererAppChannel(network, "testchannel", orderer, nwprocs.ordererRunner)

By("joining peers to channel")
network.JoinChannel(channelName, orderer, peer0Org1, peer0Org2)
Expand Down
Loading