Skip to content

Commit

Permalink
FAB-3505 Feature File verifying e2e test in Behave
Browse files Browse the repository at this point in the history
Change-Id: I0943d457b2693affe538d356875a710ecf5afd52
Signed-off-by: nishi.nidamarty <nishi.nidamarty@itpeoplecorp.com>
  • Loading branch information
2016Nishi committed May 2, 2017
1 parent f3c61e6 commit 8ccbd52
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions test/feature/FAB-3505.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#Copyright IBM Corp. 2017 All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

Feature: FAB-3505 Test chaincode_example02
As a user I want to run chaincode example02

Scenario Outline: Test chaincode example02 deploy
Given I have a bootstrapped fabric network of type <type>
When a user deploys chaincode at path "github.com/hyperledger/fabric/chaincode_example02" with ["init", "a", "1000" , "b", "2000"] with name "mycc"
Then the chaincode is deployed
When a user queries on the chaincode named "mycc" with args ["query", "a"]
Then a user receives expected response is 1000
When a user invokes on the chaincode named "mycc" with args ["txId1", "invoke", "a", 10]
When a user queries on the chaincode named "mycc" with args ["query", "a"]
Then a user receives expected response is 990

Given "Peer1" is taken down
When a user invokes on the chaincode named "mycc" with args ["txId1", "invoke", "a", 10]
And I wait "15" seconds
And "Peer1" comes back up
When a user queries on the chaincode named "mycc" with args ["query", "a"] on "Peer1"
Then a user receives expected response is 980


Examples:
| type |
| solo |
| kafka |

0 comments on commit 8ccbd52

Please sign in to comment.