Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit cb10ab7

Browse files
jbenetdaviddias
authored andcommitted
feat(tests): waste less time generating keys
1 parent 001a6eb commit cb10ab7

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

test/core/both/test-init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('init', function () {
1313
const repo = createTempRepo()
1414
const ipfs = new IPFS(repo)
1515

16-
ipfs.init({ emptyRepo: true }, (err) => {
16+
ipfs.init({ emptyRepo: true, bits: 128 }, (err) => {
1717
expect(err).to.not.exist
1818

1919
repo.exists((err, res) => {

test/utils/factory-core/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function Factory () {
3636

3737
if (!config) {
3838
config = JSON.parse(JSON.stringify(defaultConfig))
39-
const pId = PeerId.create({ bits: 32 }).toJSON()
39+
const pId = PeerId.create({ bits: 512 }).toJSON()
4040
config.Identity.PeerID = pId.id
4141
config.Identity.PrivKey = pId.privKey
4242
}
@@ -69,7 +69,7 @@ function Factory () {
6969

7070
// create the IPFS node
7171
const ipfs = new IPFS(repo)
72-
ipfs.init({ emptyRepo: true }, (err) => {
72+
ipfs.init({ emptyRepo: true, bits: 512 }, (err) => {
7373
if (err) {
7474
return callback(err)
7575
}

test/utils/factory-http/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function Factory () {
3737

3838
if (!config) {
3939
config = JSON.parse(JSON.stringify(defaultConfig))
40-
const pId = PeerId.create({ bits: 32 }).toJSON()
40+
const pId = PeerId.create({ bits: 512 }).toJSON()
4141
config.Identity.PeerID = pId.id
4242
config.Identity.PrivKey = pId.privKey
4343
}
@@ -53,7 +53,7 @@ function Factory () {
5353

5454
// create the IPFS node
5555
const ipfs = new IPFS(repo)
56-
ipfs.init({ emptyRepo: true }, (err) => {
56+
ipfs.init({ emptyRepo: true, bits: 512 }, (err) => {
5757
if (err) {
5858
return callback(err)
5959
}

test/utils/temp-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function createTempNode (num, callback) {
3131
num = leftPad(num, 3, 0)
3232

3333
series([
34-
(cb) => ipfs.init({ emptyRepo: true }, cb),
34+
(cb) => ipfs.init({ emptyRepo: true, bits: 512 }, cb),
3535
(cb) => setAddresses(repo, num, cb),
3636
(cb) => ipfs.load(cb)
3737
], (err) => {

test/utils/temp-repo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function createTempRepo () {
3131
}
3232

3333
var repo = new IPFSRepo(repoPath, {
34-
bits: 64,
34+
bits: 512,
3535
stores: store
3636
})
3737

0 commit comments

Comments
 (0)