Skip to content

Commit

Permalink
[FAB-1394]Fabric-merge gulp task
Browse files Browse the repository at this point in the history
- removed pre-test gulp task not needed
- added private data cucumber scenario to be implemented
- copied goLang example_cc_private contract to be used by private data cucumber

Signed-off-by: heatherlp <[email protected]>
Change-Id: I2c0168c3573e2e5866634c9784ace7ff4a8febc1
  • Loading branch information
heatherlp committed Nov 5, 2019
1 parent c8be9b4 commit 316a174
Show file tree
Hide file tree
Showing 605 changed files with 461,621 additions and 28 deletions.
29 changes: 12 additions & 17 deletions build/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@ if (!/master/.test(release)) {
process.env.DOCKER_IMG_TAG = dockerImageTag;
process.env.THIRDPARTY_IMG_TAG = thirdpartyImageTag;

gulp.task('pre-test', () => {
return gulp.src([
'fabric-common/lib/**/*.js',
'fabric-network/lib/**/*.js',
'fabric-client/lib/**/*.js',
'fabric-ca-client/lib/FabricCAClientImpl.js',
'fabric-ca-client/lib/helper.js',
'fabric-ca-client/lib/IdentityService.js',
'fabric-ca-client/lib/AffiliationService.js'
]);
});

gulp.task('clean-up', () => {
// some tests create temporary files or directories
// they are all created in the same temp folder
Expand Down Expand Up @@ -203,7 +191,14 @@ gulp.task('run-test-scenario', (done) => {
});

gulp.task('run-test-merge', (done) => {
const tasks = ['clean-up', 'docker-clean', 'pre-test', 'compile', 'run-test:cucumber', 'docker-clean', 'run-test:ts-cucumber'];
const tasks = ['clean-up', 'docker-clean', 'compile', 'run-test:cucumber', 'docker-clean', 'run-test:ts-cucumber'];
runSequence(...tasks, done);
});

// Task for fabric to run in verify/merge CI pipeline
// Cucumber scenario tests tagged "@fabric_merge"
gulp.task('run-test-fabric-merge', (done) => {
const tasks = ['clean-up', 'docker-clean', 'compile', 'run test:ts-cucumber-fabric-merge'];
runSequence(...tasks, done);
});

Expand All @@ -215,24 +210,24 @@ gulp.task('run-test-functional', (done) => {
// Main test method to run all test suites
// - lint, unit first, then FV, then scenario
gulp.task('run-test-all', (done) => {
const tasks = ['clean-up', 'docker-clean', 'pre-test', 'compile', 'lint', 'docs', 'test-mocha', 'test-fv-only', 'run-test-scenario'];
const tasks = ['clean-up', 'docker-clean', 'compile', 'lint', 'docs', 'test-mocha', 'test-fv-only', 'run-test-scenario'];
runSequence(...tasks, done);
});
// As above, without scenario
gulp.task('run-test', (done) => {
const tasks = ['clean-up', 'docker-clean', 'pre-test', 'compile', 'lint', 'docs', 'test-mocha', 'test-fv-only'];
const tasks = ['clean-up', 'docker-clean', 'compile', 'lint', 'docs', 'test-mocha'];
runSequence(...tasks, done);
});

// fabric end-to-end test
gulp.task('run-end-to-end', (done) => {
const tasks = ['clean-up', 'docker-clean', 'pre-test', 'compile', 'run-tape-e2e'];
const tasks = ['clean-up', 'docker-clean', 'compile', 'run-tape-e2e'];
runSequence(...tasks, done);
});

// Run all non-integration tests
gulp.task('run-test-headless', (done) => {
const tasks = ['clean-up', 'pre-test', 'compile', 'lint', 'test-mocha'];
const tasks = ['clean-up', 'compile', 'lint', 'test-mocha'];
runSequence(...tasks, done);
});

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
"test:common": "npm run coverage -- 'fabric-common/test/**/*.{js,ts}'",
"test:ca-client": "npm run coverage -- 'fabric-ca-client/test/**/*.{js,ts}'",
"test:client": "npm run coverage -- 'fabric-client/test/**/*.{js,ts}'",
"test:network": "npm run compile-src && npm run coverage -- 'fabric-network/test/**/*.{js,ts}'",
"test:network": "npm run compile && 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",
"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 @base_api",
"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 @discovery",
"test:ts-cucumber-fabric-merge": "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 @fabric_merge",
"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",
"compile-src": "tsc --project fabric-network/tsconfig-declaration.json && tsc --project fabric-network/tsconfig.json",
"compile-src:w": "tsc --project fabric-network --watch",
"compile": "tsc --project fabric-network/tsconfig-declaration.json && tsc --project fabric-network/tsconfig.json",
"compile:w": "tsc --project fabric-network --watch",
"coverage": "nyc npm run unit-test",
"retrieve-images": "./scripts/utility/fabric_images.sh amd64 2.0.0-stable"
},
Expand Down

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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"index":{"fields":["docType","owner"]},"ddoc":"indexOwnerDoc", "name":"indexOwner","type":"json"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[{
"name": "detailCol",
"policy": {
"identities": [{
"role": {
"name": "member",
"mspId": "Org1MSP"
}
},
{
"role": {
"name": "member",
"mspId": "Org2MSP"
}
}
],
"policy": {
"1-of": [
{
"signed-by": 0
},
{
"signed-by": 1
}
]
}
},
"requiredPeerCount": 1,
"maxPeerCount": 1,
"blockToLive": 100
},
{
"name": "sensitiveCol",
"policy": {
"identities": [{
"role": {
"name": "member",
"mspId": "Org1MSP"
}
}],
"policy": {
"1-of": [{
"signed-by": 0
}]
}
},
"requiredPeerCount": 0,
"maxPeerCount": 1,
"blockToLive": 100
}
]
Loading

0 comments on commit 316a174

Please sign in to comment.