Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cee9a3d

Browse files
dryajovdaviddias
authored andcommitted
test: use reduced keysize for faster tests (ipfs-inactive#698)
1 parent 78ba320 commit cee9a3d

30 files changed

+43
-41
lines changed

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
"ipfs": false
1313
},
1414
"scripts": {
15-
"test": "aegir test",
15+
"test": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir test",
1616
"test:node": "aegir test -t node",
17-
"test:browser": "node --max-old-space-size=8192 $(npm bin)/aegir test -t browser",
18-
"test:webworker": "node --max-old-space-size=8192 $(npm bin)/aegir test -t webworker",
17+
"test:browser": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir test -t browser",
18+
"test:webworker": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir test -t webworker",
1919
"lint": "aegir lint",
2020
"build": "aegir build",
21-
"release": "node --max-old-space-size=8192 $(npm bin)/aegir release ",
22-
"release-minor": "node --max-old-space-size=8192 $(npm bin)/aegir release --type minor ",
23-
"release-major": "node --max-old-space-size=8192 $(npm bin)/aegir release --type major ",
24-
"coverage": "node --max-old-space-size=8192 $(npm bin)/aegir coverage --timeout 100000",
25-
"coverage-publish": "node --max-old-space-size=8192 $(npm bin)/aegir coverage --provider coveralls --timeout 100000"
21+
"release": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir release ",
22+
"release-minor": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir release --type minor ",
23+
"release-major": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir release --type major ",
24+
"coverage": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir coverage --timeout 100000",
25+
"coverage-publish": "cross-env NODE_OPTIONS='--max-old-space-size=8192' aegir coverage --provider coveralls --timeout 100000"
2626
},
2727
"dependencies": {
2828
"async": "^2.6.0",
@@ -67,13 +67,15 @@
6767
"devDependencies": {
6868
"aegir": "^13.0.0",
6969
"chai": "^4.1.2",
70+
"cross-env": "^5.1.3",
7071
"dirty-chai": "^2.0.1",
7172
"eslint-plugin-react": "^7.6.1",
7273
"go-ipfs-dep": "^0.4.13",
7374
"gulp": "^3.9.1",
74-
"interface-ipfs-core": "~0.51.0",
7575
"hapi": "^17.2.0",
76-
"ipfsd-ctl": "~0.28.0",
76+
"interface-ipfs-core": "~0.51.0",
77+
"ipfs": "~0.28.0",
78+
"ipfsd-ctl": "~0.29.0",
7779
"pre-commit": "^1.2.2",
7880
"socket.io": "^2.0.4",
7981
"socket.io-client": "^2.0.4",

test/bitswap.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('.bitswap', function () {
1919
before(function (done) {
2020
this.timeout(20 * 1000) // slow CI
2121

22-
f.spawn((err, _ipfsd) => {
22+
f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
2323
expect(err).to.not.exist()
2424
ipfsd = _ipfsd
2525
ipfs = IPFSApi(_ipfsd.apiAddr)

test/commands.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('.commands', function () {
1717
let ipfs
1818

1919
before((done) => {
20-
f.spawn((err, _ipfsd) => {
20+
f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
2121
expect(err).to.not.exist()
2222
ipfsd = _ipfsd
2323
ipfs = IPFSApi(_ipfsd.apiAddr)

test/constructor.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('ipfs-api constructor tests', () => {
2727
before(function (done) {
2828
this.timeout(20 * 1000) // slow CI
2929

30-
f.spawn((err, node) => {
30+
f.spawn({ initOptions: { bits: 1024 } }, (err, node) => {
3131
expect(err).to.not.exist()
3232
ipfsd = node
3333
apiAddr = node.apiAddr.toString()

test/diag.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('.diag', function () {
2020
let ipfs
2121

2222
before((done) => {
23-
f.spawn((err, _ipfsd) => {
23+
f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
2424
expect(err).to.not.exist()
2525
ipfsd = _ipfsd
2626
ipfs = IPFSApi(_ipfsd.apiAddr)

test/files.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('.files (the MFS API part)', function () {
3737
const expectedMultihash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
3838

3939
before((done) => {
40-
f.spawn((err, _ipfsd) => {
40+
f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
4141
expect(err).to.not.exist()
4242
ipfsd = _ipfsd
4343
ipfs = IPFSApi(_ipfsd.apiAddr)

test/get.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('.get (specific go-ipfs features)', function () {
3131

3232
before((done) => {
3333
series([
34-
(cb) => f.spawn((err, _ipfsd) => {
34+
(cb) => f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
3535
expect(err).to.not.exist()
3636
ipfsd = _ipfsd
3737
ipfs = IPFSApi(_ipfsd.apiAddr)

test/interface/block.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const common = {
1313
setup: function (callback) {
1414
callback(null, {
1515
spawnNode: (cb) => {
16-
f.spawn((err, _ipfsd) => {
16+
f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
1717
if (err) {
1818
return cb(err)
1919
}

test/interface/bootstrap.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const common = {
1313
setup: function (callback) {
1414
callback(null, {
1515
spawnNode: (cb) => {
16-
f.spawn((err, _ipfsd) => {
16+
f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
1717
if (err) {
1818
return cb(err)
1919
}

test/interface/config.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const common = {
1313
setup: function (callback) {
1414
callback(null, {
1515
spawnNode: (cb) => {
16-
f.spawn((err, _ipfsd) => {
16+
f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
1717
if (err) {
1818
return cb(err)
1919
}

0 commit comments

Comments
 (0)