-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored golang bdd, clearer modularity. Added new bootstrap feature file to demonstrate orderer network boostrap. Will complete as Peer nears completion. Now creates geneisis block. Waiting to verify with solo orderer. Updated compose files to version 2. Added composition callback mechanism for orderer genesis block distribution. Change-Id: I7d963719b60ebe8db4bb81a470b17a7573d2e199 Signed-off-by: jeffgarratt <garratt.jeff@gmail.com>
- Loading branch information
1 parent
0698fc7
commit a94a42b
Showing
17 changed files
with
1,153 additions
and
208 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package bddtests | ||
|
||
import "github.com/DATA-DOG/godog" | ||
|
||
func FeatureContext(s *godog.Suite) { | ||
bddCtx := &BDDContext{godogSuite: s, users: make(map[string]*UserRegistration), grpcClientPort: 7051} | ||
|
||
s.BeforeScenario(bddCtx.beforeScenario) | ||
s.AfterScenario(bddCtx.afterScenarioDecompose) | ||
|
||
FeatureContextBootstrap(bddCtx, s) | ||
|
||
s.Step(`^we compose "([^"]*)"$`, bddCtx.weCompose) | ||
s.Step(`^requesting "([^"]*)" from "([^"]*)"$`, bddCtx.requestingFrom) | ||
s.Step(`^I should get a JSON response with array "([^"]*)" contains "([^"]*)" elements$`, bddCtx.iShouldGetAJSONResponseWithArrayContainsElements) | ||
s.Step(`^I wait "([^"]*)" seconds$`, bddCtx.iWaitSeconds) | ||
s.Step(`^I register with CA supplying username "([^"]*)" and secret "([^"]*)" on peers:$`, bddCtx.iRegisterWithCASupplyingUsernameAndSecretOnPeers) | ||
s.Step(`^user "([^"]*)" creates a chaincode spec "([^"]*)" of type "([^"]*)" for chaincode "([^"]*)" with args$`, bddCtx.userCreatesAChaincodeSpecOfTypeForChaincodeWithArgs) | ||
|
||
s.Step(`^user "([^"]*)" creates a deployment spec "([^"]*)" using chaincode spec "([^"]*)" and devops on peer "([^"]*)"$`, bddCtx.userCreatesADeploymentSpecUsingChaincodeSpecAndDevopsOnPeer) | ||
//s.Step(`^user "([^"]*)" creates a deployment spec "([^"]*)" using chaincode spec "([^"]*)"$`, bddCtx.userCreatesADeploymentSpecUsingChaincodeSpec) | ||
|
||
s.Step(`^user "([^"]*)" creates a deployment proposal "([^"]*)" using chaincode deployment spec "([^"]*)"$`, bddCtx.userCreatesADeploymentProposalUsingChaincodeDeploymentSpec) | ||
s.Step(`^user "([^"]*)" sends proposal "([^"]*)" to endorsers with timeout of "([^"]*)" seconds:$`, bddCtx.userSendsProposalToEndorsersWithTimeoutOfSeconds) | ||
s.Step(`^user "([^"]*)" stores their last result as "([^"]*)"$`, bddCtx.userStoresTheirLastResultAs) | ||
s.Step(`^user "([^"]*)" expects proposal responses "([^"]*)" with status "([^"]*)" from endorsers:$`, bddCtx.userExpectsProposalResponsesWithStatusFromEndorsers) | ||
s.Step(`^user "([^"]*)" sets ESCC to "([^"]*)" for chaincode spec "([^"]*)"$`, bddCtx.userSetsESCCToForChaincodeSpec) | ||
s.Step(`^user "([^"]*)" sets VSCC to "([^"]*)" for chaincode spec "([^"]*)"$`, bddCtx.userSetsVSCCToForChaincodeSpec) | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -1,20 +1,24 @@ | ||
vp: | ||
image: hyperledger/fabric-peer | ||
environment: | ||
- CORE_PEER_ADDRESSAUTODETECT=true | ||
- CORE_VM_ENDPOINT=http://172.17.0.1:2375 | ||
# TODO: This is currently required due to BUG in variant logic based upon log level. | ||
- CORE_LOGGING_LEVEL=DEBUG | ||
- CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} | ||
# Script will wait until membersrvc is up (if it exists) before starting | ||
# $$GOPATH (double dollar) required to prevent docker-compose doing its own | ||
# substitution before the value gets to the container | ||
#command: sh -c "exec $$GOPATH/src/github.com/hyperledger/fabric/bddtests/scripts/start-peer.sh" | ||
command: sh -c "sleep 2; peer node start" | ||
version: "2" | ||
|
||
# Use these options if coverage desired for peers | ||
#image: hyperledger/fabric-peer-coverage | ||
#command: ./peer.test --test.coverprofile=coverage.cov node start | ||
membersrvc: | ||
image: hyperledger/fabric-membersrvc | ||
command: membersrvc | ||
services: | ||
|
||
vp: | ||
image: hyperledger/fabric-peer | ||
environment: | ||
- CORE_PEER_ADDRESSAUTODETECT=true | ||
- CORE_VM_ENDPOINT=http://172.17.0.1:2375 | ||
# TODO: This is currently required due to BUG in variant logic based upon log level. | ||
- CORE_LOGGING_LEVEL=DEBUG | ||
- CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} | ||
# Script will wait until membersrvc is up (if it exists) before starting | ||
# $$GOPATH (double dollar) required to prevent docker-compose doing its own | ||
# substitution before the value gets to the container | ||
#command: sh -c "exec $$GOPATH/src/github.com/hyperledger/fabric/bddtests/scripts/start-peer.sh" | ||
command: sh -c "sleep 2; peer node start" | ||
|
||
# Use these options if coverage desired for peers | ||
#image: hyperledger/fabric-peer-coverage | ||
#command: ./peer.test --test.coverprofile=coverage.cov node start | ||
membersrvc: | ||
image: hyperledger/fabric-membersrvc | ||
command: membersrvc |
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
Oops, something went wrong.