Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit fa3df2b

Browse files
Use docker compose instead of docker-compose (#700)
The old `docker-compose` command no longer exists in some environments and causes build failures. Instead use the replacement `docker compose` command. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent aee9b72 commit fa3df2b

File tree

3 files changed

+116
-116
lines changed

3 files changed

+116
-116
lines changed

package.json

Lines changed: 111 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
11
{
2-
"name": "fabric-sdk-node",
3-
"version": "2.2.21-snapshot",
4-
"tag": "unstable",
5-
"main": "index.js",
6-
"private": true,
7-
"repository": {
8-
"type": "git",
9-
"url": "https://github.com/hyperledger/fabric-sdk-node"
10-
},
11-
"homepage": "https://www.hyperledger.org/projects/fabric",
12-
"author": {
13-
"name": "hyperledger/fabric",
14-
"email": "[email protected]"
15-
},
16-
"scripts": {
17-
"installAndGenerateCerts": "node ./scripts/npm_scripts/generateCerts.js",
18-
"pullFabricImages": "./scripts/utility/fabric_images.sh",
19-
"test": "run-s checkLicense cleanUp dockerClean compile lint docs unitTest:all dockerReady tapeIntegration cucumberScenario",
20-
"testNoHSM": "run-s checkLicense cleanUp dockerClean compile lint docs unitTest:all dockerReady tapeIntegration cucumberScenarioNoHSM",
21-
"checkLicense": "./scripts/npm_scripts/checkLicense.sh",
22-
"cleanUp": "node -e 'require(\"./scripts/npm_scripts/testFunctions.js\").cleanUp()'",
23-
"dockerClean": "./scripts/npm_scripts/dockerClean.sh",
24-
"compile": "tsc --project fabric-network/tsconfig.json",
25-
"lint": "eslint . --ext .ts,.js",
26-
"docs": "node -e 'require(\"./scripts/npm_scripts/testFunctions.js\").cleanUpDocs()' && jsdoc -c docs/jsdoc.json -t ./node_modules/ink-docstrap/template --pedantic --recurse",
27-
"unitTest:all": "export HFC_LOGGING='{\"debug\":\"test/temp/debug.log\"}' && nyc run-s unitTest:common unitTest:ca-client unitTest:network",
28-
"unitTest:common": "mocha --reporter list 'fabric-common/test/**/*.js'",
29-
"unitTest:ca-client": "mocha --reporter list 'fabric-ca-client/test/**/*.js'",
30-
"unitTest:network": "run-s compile \"unitTest -- --project ./fabric-network/tsconfig.json 'fabric-network/test/**/*.{js,ts}'\"",
31-
"unitTest": "ts-mocha --reporter list",
32-
"dockerReady": "npm run dockerClean && (cd test/fixtures/docker-compose && docker-compose -f docker-compose-tls-level-db.yaml -p node up -d && sleep 15 && docker ps -a)",
33-
"tapeIntegration": "./scripts/npm_scripts/runTape.sh",
34-
"cucumberScenario": "npm run setupCucumbers && export HFC_LOGGING='{\"debug\":\"test/temp/debugc.log\"}' && npm run dockerClean && nyc --check-coverage --statements 54 --branches 32 --functions 46 --lines 54 npm run test:ts-cucumber",
35-
"cucumberScenarioNoHSM": "npm run setupCucumbers && export HFC_LOGGING='{\"debug\":\"test/temp/debugc.log\"}' && npm run dockerClean && nyc --check-coverage --statements 54 --branches 32 --functions 46 --lines 54 npm run test:ts-cucumberNoHSM",
36-
"setupCucumbers": "node -e 'require(\"./scripts/npm_scripts/testFunctions.js\").createCucumberLogFile()'",
37-
"test:ts-cucumber": "tsc --project test/ts-scenario/tsconfig.json && cucumber-js -f @cucumber/pretty-formatter ./test/ts-scenario/features/*.feature --require './test/ts-scenario/lib/**/*.js'",
38-
"test:ts-cucumberNoHSM": "npm run test:ts-cucumber -- --tags 'not @gateway_hsm'",
39-
"testHeadless": "run-s cleanUp compile lint unitTest:all",
40-
"tapeAndCucumber": "run-s tapeIntegration dockerClean cucumberScenario"
41-
},
42-
"devDependencies": {
43-
"@cucumber/cucumber": "^7.3.2",
44-
"@cucumber/pretty-formatter": "^1.0.0-alpha.1",
45-
"@tsconfig/node14": "^14.1.0",
46-
"@types/chai": "^4.2.18",
47-
"@types/chai-as-promised": "^7.1.4",
48-
"@types/mocha": "^8.2.3",
49-
"@types/node": "^14.18.63",
50-
"@types/rimraf": "^3.0.0",
51-
"@types/sinon": "^10.0.0",
52-
"@types/tape": "^4.2.33",
53-
"@typescript-eslint/eslint-plugin": "^5.62.0",
54-
"@typescript-eslint/parser": "^5.62.0",
55-
"bn.js": "^5.2.0",
56-
"chai": "^4.3.4",
57-
"chai-as-promised": "^7.1.1",
58-
"elliptic": "^6.5.4",
59-
"eslint": "^8.53.0",
60-
"eslint-plugin-tsdoc": "^0.2.17",
61-
"fabric-ca-client": "file:./fabric-ca-client",
62-
"fabric-client": "^1.4.18",
63-
"fabric-common": "file:./fabric-common",
64-
"fabric-network": "file:./fabric-network",
65-
"fabric-protos": "file:./fabric-protos",
66-
"ink-docstrap": "^1.3.2",
67-
"jsdoc": "^3.6.6",
68-
"jsrsasign": "^11.0.0",
69-
"long": "^5.2.3",
70-
"mocha": "^9.2.2",
71-
"npm-run-all": "^4.1.5",
72-
"nyc": "^15.0.0",
73-
"rewire": "^6.0.0",
74-
"rimraf": "^3.0.0",
75-
"sinon": "^13.0.2",
76-
"sinon-chai": "^3.6.0",
77-
"strip-ansi": "^6.0.1",
78-
"tape": "^5.2.2",
79-
"tape-promise": "^4.0.0",
80-
"ts-mocha": "^10.0.0",
81-
"ts-mock-imports": "^1.3.4",
82-
"typescript": "~4.9.5",
83-
"winston": "^2.4.5"
84-
},
85-
"licenses": [
86-
{
87-
"type": "Apache-2.0",
88-
"url": "https://github.com/hyperledger/fabric/blob/main/LICENSE"
89-
}
90-
],
91-
"nyc": {
92-
"exclude": [
93-
"test/**",
94-
"fabric-*/index.js",
95-
"fabric-*/test/**",
96-
"fabric-protos/grpc.js",
97-
"fabric-protos/bundle.js"
98-
],
99-
"extension": [
100-
".ts"
101-
],
102-
"reporter": [
103-
"text",
104-
"html"
105-
],
106-
"cache": true,
107-
"check-coverage": true,
108-
"statements": 82,
109-
"branches": 74,
110-
"functions": 77,
111-
"lines": 83
112-
}
2+
"name": "fabric-sdk-node",
3+
"version": "2.2.21-snapshot",
4+
"tag": "unstable",
5+
"main": "index.js",
6+
"private": true,
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/hyperledger/fabric-sdk-node"
10+
},
11+
"homepage": "https://www.hyperledger.org/projects/fabric",
12+
"author": {
13+
"name": "hyperledger/fabric",
14+
"email": "[email protected]"
15+
},
16+
"scripts": {
17+
"installAndGenerateCerts": "node ./scripts/npm_scripts/generateCerts.js",
18+
"pullFabricImages": "./scripts/utility/fabric_images.sh",
19+
"test": "run-s checkLicense cleanUp dockerClean compile lint docs unitTest:all dockerReady tapeIntegration cucumberScenario",
20+
"testNoHSM": "run-s checkLicense cleanUp dockerClean compile lint docs unitTest:all dockerReady tapeIntegration cucumberScenarioNoHSM",
21+
"checkLicense": "./scripts/npm_scripts/checkLicense.sh",
22+
"cleanUp": "node -e 'require(\"./scripts/npm_scripts/testFunctions.js\").cleanUp()'",
23+
"dockerClean": "./scripts/npm_scripts/dockerClean.sh",
24+
"compile": "tsc --project fabric-network/tsconfig.json",
25+
"lint": "eslint . --ext .ts,.js",
26+
"docs": "node -e 'require(\"./scripts/npm_scripts/testFunctions.js\").cleanUpDocs()' && jsdoc -c docs/jsdoc.json -t ./node_modules/ink-docstrap/template --pedantic --recurse",
27+
"unitTest:all": "export HFC_LOGGING='{\"debug\":\"test/temp/debug.log\"}' && nyc run-s unitTest:common unitTest:ca-client unitTest:network",
28+
"unitTest:common": "mocha --reporter list 'fabric-common/test/**/*.js'",
29+
"unitTest:ca-client": "mocha --reporter list 'fabric-ca-client/test/**/*.js'",
30+
"unitTest:network": "run-s compile \"unitTest -- --project ./fabric-network/tsconfig.json 'fabric-network/test/**/*.{js,ts}'\"",
31+
"unitTest": "ts-mocha --reporter list",
32+
"dockerReady": "npm run dockerClean && (cd test/fixtures/docker-compose && docker compose -f docker-compose-tls-level-db.yaml -p node up -d && sleep 15 && docker ps -a)",
33+
"tapeIntegration": "./scripts/npm_scripts/runTape.sh",
34+
"cucumberScenario": "npm run setupCucumbers && export HFC_LOGGING='{\"debug\":\"test/temp/debugc.log\"}' && npm run dockerClean && nyc --check-coverage --statements 54 --branches 32 --functions 46 --lines 54 npm run test:ts-cucumber",
35+
"cucumberScenarioNoHSM": "npm run setupCucumbers && export HFC_LOGGING='{\"debug\":\"test/temp/debugc.log\"}' && npm run dockerClean && nyc --check-coverage --statements 54 --branches 32 --functions 46 --lines 54 npm run test:ts-cucumberNoHSM",
36+
"setupCucumbers": "node -e 'require(\"./scripts/npm_scripts/testFunctions.js\").createCucumberLogFile()'",
37+
"test:ts-cucumber": "tsc --project test/ts-scenario/tsconfig.json && cucumber-js -f @cucumber/pretty-formatter ./test/ts-scenario/features/*.feature --require './test/ts-scenario/lib/**/*.js'",
38+
"test:ts-cucumberNoHSM": "npm run test:ts-cucumber -- --tags 'not @gateway_hsm'",
39+
"testHeadless": "run-s cleanUp compile lint unitTest:all",
40+
"tapeAndCucumber": "run-s tapeIntegration dockerClean cucumberScenario"
41+
},
42+
"devDependencies": {
43+
"@cucumber/cucumber": "^7.3.2",
44+
"@cucumber/pretty-formatter": "^1.0.0-alpha.1",
45+
"@tsconfig/node14": "^14.1.0",
46+
"@types/chai": "^4.2.18",
47+
"@types/chai-as-promised": "^7.1.4",
48+
"@types/mocha": "^8.2.3",
49+
"@types/node": "^14.18.63",
50+
"@types/rimraf": "^3.0.0",
51+
"@types/sinon": "^10.0.0",
52+
"@types/tape": "^4.2.33",
53+
"@typescript-eslint/eslint-plugin": "^5.62.0",
54+
"@typescript-eslint/parser": "^5.62.0",
55+
"bn.js": "^5.2.0",
56+
"chai": "^4.3.4",
57+
"chai-as-promised": "^7.1.1",
58+
"elliptic": "^6.5.4",
59+
"eslint": "^8.53.0",
60+
"eslint-plugin-tsdoc": "^0.2.17",
61+
"fabric-ca-client": "file:./fabric-ca-client",
62+
"fabric-client": "^1.4.18",
63+
"fabric-common": "file:./fabric-common",
64+
"fabric-network": "file:./fabric-network",
65+
"fabric-protos": "file:./fabric-protos",
66+
"ink-docstrap": "^1.3.2",
67+
"jsdoc": "^3.6.6",
68+
"jsrsasign": "^11.0.0",
69+
"long": "^5.2.3",
70+
"mocha": "^9.2.2",
71+
"npm-run-all": "^4.1.5",
72+
"nyc": "^15.0.0",
73+
"rewire": "^6.0.0",
74+
"rimraf": "^3.0.0",
75+
"sinon": "^13.0.2",
76+
"sinon-chai": "^3.6.0",
77+
"strip-ansi": "^6.0.1",
78+
"tape": "^5.2.2",
79+
"tape-promise": "^4.0.0",
80+
"ts-mocha": "^10.0.0",
81+
"ts-mock-imports": "^1.3.4",
82+
"typescript": "~4.9.5",
83+
"winston": "^2.4.5"
84+
},
85+
"licenses": [
86+
{
87+
"type": "Apache-2.0",
88+
"url": "https://github.com/hyperledger/fabric/blob/main/LICENSE"
89+
}
90+
],
91+
"nyc": {
92+
"exclude": [
93+
"test/**",
94+
"fabric-*/index.js",
95+
"fabric-*/test/**",
96+
"fabric-protos/grpc.js",
97+
"fabric-protos/bundle.js"
98+
],
99+
"extension": [
100+
".ts"
101+
],
102+
"reporter": [
103+
"text",
104+
"html"
105+
],
106+
"cache": true,
107+
"check-coverage": true,
108+
"statements": 82,
109+
"branches": 74,
110+
"functions": 77,
111+
"lines": 83
112+
}
113113
}

test/ts-scenario/src/steps/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ export const ADMIN_NAME = 'admin';
108108
export const ADMIN_PW = 'adminpw';
109109

110110
// Default Naming
111-
export const EVENT_HUB_DEFAULT_NAME = 'myHub';
111+
export const EVENT_HUB_DEFAULT_NAME = 'myHub';

test/ts-scenario/src/steps/docker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Given(/^I deploy a (.+?) Fabric network at (.+?) version/, {timeout: Constants.S
3535
if (!fabricState || !fabricState.deployed) {
3636
BaseUtils.logMsg(` **** deploying a new fabric network of type ${type} version ${version}`);
3737
if (type.localeCompare('non-tls') === 0) {
38-
await commandRunner.runShellCommand(true, 'docker-compose -f ' + nonTlsNetwork + ' -p node up -d');
38+
await commandRunner.runShellCommand(true, 'docker compose -f ' + nonTlsNetwork + ' -p node up -d');
3939
} else {
40-
await commandRunner.runShellCommand(true, 'docker-compose -f ' + tlsNetwork + ' -p node up -d');
40+
await commandRunner.runShellCommand(true, 'docker compose -f ' + tlsNetwork + ' -p node up -d');
4141
}
4242
stateStore.set(Constants.FABRIC_STATE, {deployed: true, type, version});
4343
await BaseUtils.sleep(Constants.INC_SHORT);
@@ -54,9 +54,9 @@ Given(/^I deploy a (.+?) Fabric network at (.+?) version/, {timeout: Constants.S
5454
await BaseUtils.sleep(Constants.INC_MED);
5555

5656
if (type.localeCompare('non-tls') === 0) {
57-
await commandRunner.runShellCommand(true, 'docker-compose -f ' + nonTlsNetwork + ' -p node up -d');
57+
await commandRunner.runShellCommand(true, 'docker compose -f ' + nonTlsNetwork + ' -p node up -d');
5858
} else {
59-
await commandRunner.runShellCommand(true, 'docker-compose -f ' + tlsNetwork + ' -p node up -d');
59+
await commandRunner.runShellCommand(true, 'docker compose -f ' + tlsNetwork + ' -p node up -d');
6060
}
6161
stateStore.set(Constants.FABRIC_STATE, {deployed: true, type, version});
6262
await BaseUtils.sleep(Constants.INC_SHORT);

0 commit comments

Comments
 (0)