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
16 changes: 13 additions & 3 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,19 @@ func beforeE2ETest(t *testing.T) *testState {
orgsC1 := GetOrgs(t, ts.client1, 200)
orgsC2 := GetOrgs(t, ts.client2, 200)
if len(orgsC1) >= 2 && len(orgsC2) >= 2 {
ts.org1 = orgsC1[0]
ts.org2 = orgsC1[1]
break
// in case there are more than two orgs in the network we need to ensure
// we select the same two that were provided in the first two elements
// of the stack file
for _, org := range orgsC1 {
if org.Name == stack.Members[0].OrgName {
ts.org1 = org
} else if org.Name == stack.Members[1].OrgName {
ts.org2 = org
}
}
if ts.org1 != nil && ts.org2 != nil {
break
}
}
t.Logf("Waiting for 2 orgs to appear. Currently have: node1=%d node2=%d", len(orgsC1), len(orgsC2))
time.Sleep(3 * time.Second)
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/stack.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2021 Kaleido, Inc.
// Copyright © 2022 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -33,6 +33,7 @@ type Member struct {
Password string `json:"password,omitempty"`
UseHTTPS bool `json:"useHttps,omitempty"`
ExposedConnectorPort int `json:"exposedConnectorPort,omitempty"`
OrgName string `json:"orgName,omitempty"`
}

func GetMemberPort(filename string, n int) (int, error) {
Expand Down