You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new role to BDD to account for recent instantiation policy changes
in peer. The mspAdmin role user's certificate will be added to the
admincerts attribute of the MSPConfig used for the consortiums
definition.
Modify the boostrap.feature to use the mspAdmin for the instantiation
related tasks.
Modify dumping logs to tmp folder for run.
Change-Id: I696efc1ea40451094c204b6752d95ca4d33f86a1
Signed-off-by: Jeff Garratt <[email protected]>
And the ordererBootstrapAdmin creates a consortium "consortium1" (network name) for peer orgs who wish to form a network:
48
63
| Organization |
49
64
| peerOrg0 |
50
65
| peerOrg1 |
51
66
# | peerOrg2 |
52
67
68
+
53
69
# Order info includes orderer admin/orderer information and address (host:port) from previous steps
54
70
# Only the peer organizations can vary.
55
71
And the ordererBootstrapAdmin using cert alias "bootstrapCertAlias" creates the genesis block "ordererGenesisBlock" for chain "OrdererSystemChainId" for network config policy "<PolicyType>" and consensus "<ConsensusType>" using consortiums:
@@ -62,20 +78,6 @@ Feature: Bootstrap
62
78
# to be used for setting the orderer genesis block path parameter in composition
63
79
And the orderer admins use the genesis block for chain "OrdererSystemChainId" to configure orderers
64
80
65
-
# We now have an orderer network with NO peers. Now need to configure and start the peer network
66
-
# This can be currently automated through folder creation of the proper form and placing PEMs.
67
-
And user requests role for peer by creating a key and csr for peer and acquires signed certificate from organization:
68
-
| User | Peer | Organization |AliasSavedUnder|
69
-
| peer0Signer | peer0 | peerOrg0 | |
70
-
| peer1Signer | peer1 | peerOrg0 | |
71
-
| peer2Signer | peer2 | peerOrg1 | |
72
-
| peer3Signer | peer3 | peerOrg1 | |
73
-
| peer0Admin | peer0 | peerOrg0 |peer-admin-cert|
74
-
| peer1Admin | peer1 | peerOrg0 |peer-admin-cert|
75
-
| peer2Admin | peer2 | peerOrg1 |peer-admin-cert|
76
-
| peer3Admin | peer3 | peerOrg1 |peer-admin-cert|
77
-
78
-
79
81
And we compose "<ComposeFile>"
80
82
81
83
# Sleep as to allow system up time
@@ -199,38 +201,41 @@ Feature: Bootstrap
199
201
200
202
201
203
Given user "peer0Admin" gives "cc_spec" to user "dev0Org0"
204
+
And user "peer0Admin" gives "cc_spec" to user "mspAdminPeerOrg0"
202
205
203
-
# Under the covers, create a deployment spec, etc.
204
-
When user "dev0Org0" using cert alias "dev0Org0App1" creates a instantiate proposal "instantiateProposal1" for channel "com.acme.blockchain.jdoe.Channel1" using chaincode spec "cc_spec"
205
206
206
-
And user "dev0Org0" using cert alias "dev0Org0App1" sends proposal "instantiateProposal1" to endorsers with timeout of "90" seconds with proposal responses "instantiateProposalResponses":
207
+
When user "mspAdminPeerOrg0" using cert alias "msp-admin-cert" creates a instantiate proposal "instantiateProposal1" for channel "com.acme.blockchain.jdoe.Channel1" using chaincode spec "cc_spec"
208
+
209
+
And user "mspAdminPeerOrg0" using cert alias "msp-admin-cert" sends proposal "instantiateProposal1" to endorsers with timeout of "90" seconds with proposal responses "instantiateProposalResponses":
207
210
| Endorser |
208
211
| peer0 |
209
212
| peer2 |
210
213
211
214
212
-
Then user "dev0Org0" expects proposal responses "instantiateProposalResponses" with status "200" from endorsers:
215
+
Then user "mspAdminPeerOrg0" expects proposal responses "instantiateProposalResponses" with status "200" from endorsers:
213
216
| Endorser |
214
217
| peer0 |
215
218
| peer2 |
216
219
217
-
And user "dev0Org0" expects proposal responses "instantiateProposalResponses" each have the same value from endorsers:
220
+
And user "mspAdminPeerOrg0" expects proposal responses "instantiateProposalResponses" each have the same value from endorsers:
218
221
| Endorser |
219
222
| peer0 |
220
223
| peer2 |
221
224
222
-
When the user "dev0Org0" creates transaction "instantiateTx1" from proposal "instantiateProposal1" and proposal responses "instantiateProposalResponses" for channel "com.acme.blockchain.jdoe.Channel1"
225
+
When the user "mspAdminPeerOrg0" creates transaction "instantiateTx1" from proposal "instantiateProposal1" and proposal responses "instantiateProposalResponses" for channel "com.acme.blockchain.jdoe.Channel1"
223
226
224
-
And the user "dev0Org0" broadcasts transaction "instantiateTx1" to orderer "<orderer1>" on channel "com.acme.blockchain.jdoe.Channel1"
227
+
And the user "mspAdminPeerOrg0" broadcasts transaction "instantiateTx1" to orderer "<orderer1>" on channel "com.acme.blockchain.jdoe.Channel1"
225
228
226
229
# Sleep as the deliver takes a bit to have the first block ready
227
230
And I wait "2" seconds
228
231
229
-
And user "dev0Org0" sends deliver a seek request on orderer "<orderer0>" with properties:
232
+
And user "mspAdminPeerOrg0" using cert alias "msp-admin-cert" connects to deliver function on orderer "<orderer0>"
233
+
234
+
And user "mspAdminPeerOrg0" sends deliver a seek request on orderer "<orderer0>" with properties:
230
235
| ChainId | Start | End |
231
236
| com.acme.blockchain.jdoe.Channel1 | 1 | 1 |
232
237
233
-
Then user "dev0Org0" should get a delivery "deliveredInstantiateTx1Block" from "<orderer0>" of "1" blocks with "1" messages within "1" seconds
238
+
Then user "mspAdminPeerOrg0" should get a delivery "deliveredInstantiateTx1Block" from "<orderer0>" of "1" blocks with "1" messages within "1" seconds
234
239
235
240
# Sleep as the deliver takes a bit to have the first block ready
# matchingNATs = [nat for nat in directory.getNamedCtxTuples() if (("orderer" in nat.user) and ("Signer" in nat.user) and ((compose_service in nat.nodeName)))]
@@ -808,6 +796,20 @@ class PathType(Enum):
808
796
Container=2
809
797
810
798
799
+
defgetMSPConfig(org, directory):
800
+
adminCerts= [org.getCertAsPEM()]
801
+
# Find the mspAdmin Tuple for org and add to admincerts folder
802
+
forpnt, certin [(nat, cert) fornat, certindirectory.ordererAdminTuples.items() if
0 commit comments