Skip to content

Commit

Permalink
Basic endorser service and BDD
Browse files Browse the repository at this point in the history
Change-Id: Id811b29aa319e242d505ab80bb330934cf07f352
Signed-off-by: jeffgarratt <garratt.jeff@gmail.com>
  • Loading branch information
jeffgarratt committed Sep 8, 2016
1 parent 543baa3 commit ce733d2
Show file tree
Hide file tree
Showing 16 changed files with 1,371 additions and 92 deletions.
2 changes: 1 addition & 1 deletion bddtests/.behaverc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ tags=~@issue_767
~@issue_1565
~@issue_RBAC_TCERT_With_Attributes
~@sdk
~@endorser
~@FAB-314
181 changes: 124 additions & 57 deletions bddtests/chaincode_pb2.py

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions bddtests/chaincodeevent_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions bddtests/docker-compose-next-4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
membersrvc0:
extends:
file: compose-defaults.yml
service: membersrvc

orderer0:
extends:
file: docker-compose-orderer-solo.yml
service: orderer0


vp0:
extends:
file: docker-compose-next.yml
service: vpNext
environment:
- CORE_PEER_ID=vp0
- CORE_SECURITY_ENROLLID=test_vp0
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT
- CORE_PEER_PROFILE_ENABLED=true
links:
- membersrvc0
- orderer0
# ports:
# - 7050:6060


vp1:
extends:
file: docker-compose-next.yml
service: vpNext
environment:
- CORE_PEER_ID=vp1
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp1
- CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy
links:
- membersrvc0
- orderer0
- vp0

vp2:
extends:
file: docker-compose-next.yml
service: vpNext
environment:
- CORE_PEER_ID=vp2
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp2
- CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ
links:
- membersrvc0
- orderer0
- vp0

vp3:
extends:
file: docker-compose-next.yml
service: vpNext
environment:
- CORE_PEER_ID=vp3
- CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051
- CORE_SECURITY_ENROLLID=test_vp3
- CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL
links:
- membersrvc0
- orderer0
- vp0
13 changes: 13 additions & 0 deletions bddtests/docker-compose-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
vpNext:
extends:
file: compose-defaults.yml
service: vp
environment:
- CORE_NEXT=true
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_SECURITY_ENABLED=true
- CORE_PEER_PKI_ECA_PADDR=membersrvc0:7054
- CORE_PEER_PKI_TCA_PADDR=membersrvc0:7054
- CORE_PEER_PKI_TLSCA_PADDR=membersrvc0:7054
- CORE_PEER_PKI_TLS_ROOTCERT_FILE=./bddtests/tlsca.cert

89 changes: 89 additions & 0 deletions bddtests/endorser.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#
# Test Endorser function
#
# Tags that can be used and will affect test internals:
# @doNotDecompose will NOT decompose the named compose_yaml after scenario ends. Useful for setting up environment and reviewing after scenario.
# @chaincodeImagesUpToDate use this if all scenarios chaincode images are up to date, and do NOT require building. BE SURE!!!

#@chaincodeImagesUpToDate
@endorser
Feature: Endorser
As a application developer
I want to get endorsements and submit transactions and receive events

Scenario: Peers list test, single peer issue #827
Given we compose "docker-compose-1.yml"
When requesting "/network/peers" from "vp0"
Then I should get a JSON response with array "peers" contains "1" elements