Skip to content

Commit

Permalink
[FABN-1039] Remove gulp from release1.4 (hyperledger#107)
Browse files Browse the repository at this point in the history
* [FABN-1039] Remove gulp from release-1.4

Initial commit after manually applying PR#61

Signed-off-by: heatherlp <[email protected]>

* [FAB-1039] Additional work required for gulp removal

Signed-off-by: heatherlp <[email protected]>

* FABN-1039: Fix master branch doc publishing (hyperledger#74)

Signed-off-by: Mark S. Lewis <[email protected]>

* [FAB-1039] PR hyperledger#107 Clean up api docs publishing scripts

Signed-off-by: heatherlp <[email protected]>

Co-authored-by: Mark S. Lewis <[email protected]>
Signed-off-by: heatherlp <[email protected]>
  • Loading branch information
heatherlp and bestbeforetoday committed Feb 21, 2020
1 parent b27f324 commit b97fb72
Show file tree
Hide file tree
Showing 54 changed files with 2,761 additions and 10,071 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ docs/**
fabric-network/lib/**
fabric-protos/**
fabric-client/test/data/**
tmp/**
test/typescript/**
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ test/typescript/**/*.js.map
test/fixtures/src/node_cc/example_cc/.npmrc
test/fixtures/src/node_cc/example_cc1/.npmrc
test/fixtures/src/github.com/example_cc/junk.go
test/temp/**

#fabric client
fabric-client/.DS_Store
Expand Down
14 changes: 6 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@ Please consult [Fabric's CONTRIBUTING documentation](http://hyperledger-fabric.r

## To code contributors

The following check-list is for code contributors to make sure their changesets are compliant to the coding standards and avoid time wasted in rejected changesets:
The following check-list is for code contributors to make sure their commits are compliant and avoid time wasted in rejected pull requests:

Check the coding styles, run the following command and make sure no ESLint violations are present:
* `gulp`
* `npm run lint`

Run the full unit test bucket and make sure 100% are passing. You can also run each test individually to isolate any failures:
* `gulp test`

The gulp test command above also generates code coverage reports. Your new code should be accompanied with unit tests that provide 100% line coverage, and functional tests that establish the correct operation of your code delivery.
Run the full test bucket and make sure 100% are passing. You can also run each test individually to isolate any failures:
* `npm test`

## Test Delivery

The Fabric-SDK-Node repository contains unit and functional (e2e) tests to ensure correct code functionality and guard against regressions. The published packages are tested in an additional repository ([Fabric-Test](https://github.com/hyperledger/fabric-test)), which tests the interoperability of the Fabric-SDK-Node packages with all other Hyperledger Fabric repositories.
The Fabric-SDK-Node repository contains unit, integration and scenario tests to ensure correct code functionality and guard against regressions. The published packages are tested in an additional repository ([Fabric-Test](https://github.com/hyperledger/fabric-test)), which tests the interoperability of the Fabric-SDK-Node packages with all other Hyperledger Fabric repositories.

### Unit Tests
Unit tests for each package are held locally under a `package/test` directory that mirrors the `package/lib` directory. Tests within these directories are written in Mocha, and may be run locally within the package via the `npm test` command at the package level. We make use of the following dependancies within the unit tests:
Unit tests for each package are held locally under a `package/test` directory that mirrors the `package/lib` directory. Tests within these directories are written in Mocha, and may be run locally with the corresponding npm task: `npm run unitTest:<packageName>`. We make use of the following dependencies within the unit tests:
- [Sinon](https://sinonjs.org/) for test spies, stubs and mocks
- [Rewire](https://github.com/jhnns/rewire) for greater control of the component under test
- [Istanbul](https://istanbul.js.org/) for code coverage reports
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ To build and test, the following pre-requisites must be installed first:
* Node.js, version 8 is supported from 8.9.4 and higher.
* Node.js, version 10 is supported from 10.15.3 and higher.
* npm tool version 5.5.1 or higher
* gulp command (must be installed globaly with `npm install -g gulp`)
* docker (not required if you only want to run the headless tests with `npm test`, see below)
* docker (only required for running integration tests, see below)

Clone the project and launch the following commands to install the dependencies and perform various tasks.

In the project root folder:
* `npm install` to install dependencies
* optionally, `gulp docs` to generate API docs if you want to review the doc content
* `npm test` or `gulp test-headless` to run the headless tests that do not require any additional set up
* optionally, `npm run docs` to generate API docs if you want to review the doc content
* To run the unit tests that do not require any additional set up, use `npm run testHeadless`

The following tests require setting up a local blockchain network as the target. You need to build the necessary Docker images required to run the network. Follow the steps below to set it up.
* You will need the peers, orderers and fabric-ca server (new implementation of the member service) to run the tests. The first two components are from the *fabric* repository. The fabric-ca server is from the *fabric-ca* repository.
Expand All @@ -47,7 +46,7 @@ You can build the docker images in your native host (Mac, Ubuntu, Windows, etc.)
* run `make docker` to build the docker images (you may need to run `make docker-clean` first if you've built before)
* Now you are ready to run the tests:
* Clear out your previous key value stores that may have cached user enrollment certificates (`rm -rf /tmp/hfc-*`, `rm -rf ~/.hfc-key-store`)
* run `gulp test` to execute the entire test suite (800+ test cases), or you can run them individually
* run `npm test` to execute the entire test suite (800+ test cases), or you can run them individually
* Test happy path from end to end, run `node test/integration/e2e.js`
* Test end to end one step at a time, make sure to follow this sequence:
* `node test/integration/e2e/create-channel.js`
Expand All @@ -68,7 +67,7 @@ You can build the docker images in your native host (Mac, Ubuntu, Windows, etc.)
The SDK has support for Hardware Security Module via PKCS#11 interface. See [Testing for Hardware Security Module via PKCS#11 interface](https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-hsm-pkcs11.html) for configuration and tests.

### Hyperledger Fabric Client objects and reference documentation
The SDK has support for Java based Chaincode. To turn these tests off, set the environment variable "JAVA_TESTS" to false.
The SDK has support for Java based Chaincode.

### Hyperledger Fabric Client objects
fabric-client and fabric-ca-client are written in CommonJS modules and take advantage of ECMAScript 2015 class syntax.
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ steps:
- script: npm install
displayName: 'npm install'

- script: npx gulp run-test-all
- script: npm test
displayName: 'Run tests'

- script: scripts/ci_scripts/azurePublishNpmPackages.sh
Expand Down
42 changes: 0 additions & 42 deletions build/tasks/ca.js

This file was deleted.

6 changes: 0 additions & 6 deletions build/tasks/chklic.js

This file was deleted.

80 changes: 0 additions & 80 deletions build/tasks/doc.js

This file was deleted.

29 changes: 0 additions & 29 deletions build/tasks/eslint.js

This file was deleted.

Loading

0 comments on commit b97fb72

Please sign in to comment.