-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* impl Signed-off-by: SamYuan1990 <yy19902439@126.com>
- Loading branch information
1 parent
5f72599
commit 5a6da3c
Showing
14 changed files
with
195 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
Chaincode,BatchTimeout,MaxMessageCount,AbsoluteMaxBytes,PreferredMaxBytes,TPS, | ||
sample,1,10,3,4, 122.308717, | ||
sample,2,10,3,4, 123.720466, | ||
Chaincode,BatchTimeout,MaxMessageCount,AbsoluteMaxBytes,PreferredMaxBytes,TPS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const app = require('../app'); | ||
const request = require('supertest')(app); | ||
|
||
describe('# test app.js', function () { | ||
it('Post /api/run/new 200', function (done) { | ||
request.post('/api/run/new').set('Content-Type', 'application/x-www-form-urlencoded').send( | ||
{ | ||
BatchTimeout: '1', | ||
MaxMessageCount: '10,20', | ||
AbsoluteMaxBytes: '103809024', | ||
PreferredMaxBytes: '524288', | ||
path: './minifabric', | ||
cmd: `[ | ||
{"order":0,"cmdType":"Shell","args":["./minifab","up","-i","2.2"]}, | ||
{"order":1,"cmdType":"Shell","args":["./minifab","channelquery","-c","systemchannel"]}, | ||
{"order":2,"cmdType":"Shell","args":["cp","vars/systemchannel_config.json","updatedchannel.json"]}, | ||
{"order":3,"cmdType":"PrePare","args":["./prepareConfig.sh"]}, | ||
{"order":4,"cmdType":"Shell","args":["cp","updatedchannel.json","vars/systemchannel_config.json"]}, | ||
{"order":5,"cmdType":"Shell","args":["./minifab","channelsign,channelupdate","-c","systemchannel"]}, | ||
{"order":6,"cmdType":"Shell","args":["mkdir","-p","/tmp/minifab"]}, | ||
{"order":7,"cmdType":"Shell","args":["cp","config.yaml","/tmp/minifab"]}, | ||
{"order":8,"cmdType":"Shell","args":["cp","-r","./vars","/tmp/minifab"]}, | ||
{"order":9,"cmdType":"Tape","args":["docker","run","--name","tape","-e","TAPE_LOGLEVEL=debug","--network","mysite0","-v","/tmp/minifab:/config","guoger/tape","tape","-c","/config/config.yaml","-n","500"]}, | ||
{"order":10,"cmdType":"Shell","args":["docker","rm","tape"]}, | ||
{"order":11,"cmdType":"Shell","args":["rm","-rf","/tmp/minifab"]}, | ||
{"order":12,"cmdType":"Shell","args":["sleep","10"]}, | ||
{"order":13,"cmdType":"Shell","args":["./minifab","down"]}, | ||
{"order":14,"cmdType":"Shell","args":["./minifab","cleanup"]}]` | ||
}).expect(200, done); | ||
}); | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Definition of nodes | ||
peer1: &peer1 | ||
addr: peer1.org0.example.com:7051 | ||
tls_ca_cert: /config/vars/keyfiles/peerOrganizations/org0.example.com/msp/tlscacerts/tlsca.org0.example.com-cert.pem | ||
|
||
peer2: &peer2 | ||
addr: peer1.org1.example.com:7051 | ||
tls_ca_cert: /config/vars/keyfiles/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem | ||
|
||
orderer1: &orderer1 | ||
addr: orderer1.example.com:7050 | ||
tls_ca_cert: /config/vars/keyfiles/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem | ||
|
||
# Nodes to interact with | ||
endorsers: | ||
- *peer1 | ||
- *peer2 | ||
# we might support multi-committer in the future for more complex test scenario, | ||
# i.e. consider tx committed only if it's done on >50% of nodes. But for now, | ||
# it seems sufficient to support single committer. | ||
committers: | ||
- *peer2 | ||
|
||
commitThreshold: 1 | ||
|
||
orderer: *orderer1 | ||
|
||
# Invocation configs | ||
channel: mychannel | ||
chaincode: simple | ||
args: | ||
- query | ||
- a | ||
mspid: org0-example-com | ||
|
||
private_key: /config/vars/keyfiles/peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/keystore/priv_sk | ||
sign_cert: /config/vars/keyfiles/peerOrganizations/org0.example.com/users/Admin@org0.example.com/msp/signcerts/Admin@org0.example.com-cert.pem | ||
num_of_conn: 10 | ||
client_per_conn: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
sed -i -e "s/ \"timeout\": \".*s\"/ \"timeout\": \"$1s\"/g" updatedchannel.json | ||
sed -i -e "s/ \"max_message_count\": .*,/ \"max_message_count\": $2,/g" updatedchannel.json | ||
sed -i -e "s/ \"absolute_max_bytes\": .*,/ \"absolute_max_bytes\": $3,/g" updatedchannel.json | ||
sed -i -e "s/ \"preferred_max_bytes\": .*/ \"preferred_max_bytes\": $4/g" updatedchannel.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Definition of nodes | ||
peer1: &peer1 | ||
addr: peer0.org1.example.com:7051 | ||
tls_ca_cert: /config/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem | ||
|
||
peer2: &peer2 | ||
addr: peer0.org2.example.com:9051 | ||
tls_ca_cert: /config/fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem | ||
|
||
orderer1: &orderer1 | ||
addr: orderer.example.com:7050 | ||
tls_ca_cert: /config/fabric-samples/test-network/organizations/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem | ||
|
||
# Nodes to interact with | ||
endorsers: | ||
- *peer1 | ||
- *peer2 | ||
# we might support multi-committer in the future for more complex test scenario, | ||
# i.e. consider tx committed only if it's done on >50% of nodes. But for now, | ||
# it seems sufficient to support single committer. | ||
committers: | ||
- *peer2 | ||
|
||
commitThreshold: 1 | ||
|
||
orderer: *orderer1 | ||
|
||
# Invocation configs | ||
channel: mychannel | ||
chaincode: basic | ||
args: | ||
- GetAllAssets | ||
mspid: Org1MSP | ||
private_key: /config/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/priv_sk | ||
sign_cert: /config/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem | ||
num_of_conn: 40 | ||
client_per_conn: 40 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters