Skip to content

Commit

Permalink
[FABN-1396] Convert events feature test to typescript
Browse files Browse the repository at this point in the history
- Add and extend events feature to typescript
- Delete obsolete javascript events feature
- Enhance TS scenarios
- Add lifecycle feature to typescript
- Delete obsolete javascript lifecycle feature
- Drop code coverage on cucmber suite as tests are being pulled from there and the suite is to be deleted

Change-Id: If64280450647ccd5ec77346e1546345fe1e18c7c
Signed-off-by: nkl199@yahoo.co.uk <nkl199@yahoo.co.uk>
  • Loading branch information
nklincoln committed Oct 22, 2019
1 parent bb5cad2 commit b11008e
Show file tree
Hide file tree
Showing 643 changed files with 464,316 additions and 290 deletions.
4 changes: 2 additions & 2 deletions build/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ gulp.task('mocha-fabric-protos',
// Definition of Javascript Cucumber (scenario) test suite
// override the global nyc configuration (defined in top level package.json)
gulp.task('run-test:cucumber', shell.task(
'export HFC_LOGGING=\'' + cucumber_log + '\'; npx nyc --check-coverage --statements 57 --branches 42 --functions 59 --lines 57 npm run test:cucumber'
'export HFC_LOGGING=\'' + cucumber_log + '\'; npx nyc --check-coverage --statements 1 --branches 1 --functions 1 --lines 1 npm run test:cucumber'
));
// Definition of Typescript Cucumber (scenario) test suite
// override the global nyc configuration
Expand All @@ -190,7 +190,7 @@ gulp.task('test-fv-scenario', shell.task('npx nyc gulp run-test-fv-scenario'));

// run fv only with code coverage
// override the global nyc configuration
gulp.task('test-fv-only', shell.task('npx nyc --check-coverage --statements 55 --branches 44 --functions 57 --lines 55 gulp run-tape-e2e'));
gulp.task('test-fv-only', shell.task('npx nyc --check-coverage --statements 54 --branches 44 --functions 56 --lines 54 gulp run-tape-e2e'));

gulp.task('run-test-fv-scenario', (done) => {
const tasks = ['run-tape-e2e', 'docker-clean', 'run-test:cucumber', 'docker-clean', 'run-test:ts-cucumber'];
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"test:network": "npm run compile-src && npm run coverage -- 'fabric-network/test/**/*.{js,ts}'",
"test:protos": "npm run coverage -- 'fabric-protos/test/**/*.{js,ts}",
"test:cucumber": "cucumber-js ./test/scenario/features/*.feature",
"test:ts-cucumber": "cucumber-js ./test/ts-scenario/features/*.feature --require './test/ts-scenario/steps/**/*.ts' --require './test/ts-scenario/support/**/*.ts' --require-module ts-node/register --format progress-bar",
"test:ts-cucumber-tagged": "cucumber-js ./test/ts-scenario/features/*.feature --require './test/ts-scenario/steps/**/*.ts' --require './test/ts-scenario/support/**/*.ts' --require-module ts-node/register --format progress-bar --tags @deprecated",
"test:all": "nyc npm run unit-test:all",
"test:ts-cucumber": "cucumber-js ./test/ts-scenario/features/*.feature --require './test/ts-scenario/steps/**/*.ts' --require './test/ts-scenario/support/**/*.ts' --require-module ts-node/register",
"test:ts-cucumber-tagged": "cucumber-js ./test/ts-scenario/features/*.feature --require './test/ts-scenario/steps/**/*.ts' --require './test/ts-scenario/support/**/*.ts' --require-module ts-node/register --tags @lifecycle",
"test:all": "nyc npm run unit-test:all",
"unit-test:all": "npm run unit-test -- 'fabric-common/test/**/*.{js,ts}' && npm run unit-test -- 'fabric-ca-client/test/**/*.{js,ts}' && npm run unit-test -- 'fabric-client/test/**/*.{js,ts}' && npm run unit-test -- 'fabric-network/test/**/*.{js,ts}'",
"unit-test": "mocha --require ts-node/register --exclude 'fabric-client/test/data/**'",
"compile": "npm run compile-src && npm run compile-test",
Expand Down
72 changes: 0 additions & 72 deletions test/scenario/features/chaincode_lifecycle.feature

This file was deleted.

44 changes: 0 additions & 44 deletions test/scenario/features/event.feature

This file was deleted.

149 changes: 149 additions & 0 deletions test/ts-fixtures/chaincode/goLang/src/github.com/legacyGo/Gopkg.lock

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright IBM Corp All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0

[[constraint]]
branch = "master"
name = "github.com/hyperledger/fabric-chaincode-go"

[[constraint]]
branch = "master"
name = "github.com/hyperledger/fabric-protos-go"

[prune]
go-tests = true
unused-packages = true
Loading

0 comments on commit b11008e

Please sign in to comment.