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

Commit

Permalink
feat(tests): waste less time generating keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenet committed Sep 11, 2016
1 parent 45811f2 commit 2b98773
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/core/both/test-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('init', function () {
const repo = createTempRepo()
const ipfs = new IPFS(repo)

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

repo.exists((err, res) => {
Expand Down
4 changes: 2 additions & 2 deletions test/utils/factory-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Factory () {

if (!config) {
config = JSON.parse(JSON.stringify(defaultConfig))
const pId = PeerId.create({ bits: 32 }).toJSON()
const pId = PeerId.create({ bits: 512 }).toJSON()
config.Identity.PeerID = pId.id
config.Identity.PrivKey = pId.privKey
}
Expand Down Expand Up @@ -69,7 +69,7 @@ function Factory () {

// create the IPFS node
const ipfs = new IPFS(repo)
ipfs.init({ emptyRepo: true }, (err) => {
ipfs.init({ emptyRepo: true, bits: 512 }, (err) => {
if (err) {
return callback(err)
}
Expand Down
4 changes: 2 additions & 2 deletions test/utils/factory-http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Factory () {

if (!config) {
config = JSON.parse(JSON.stringify(defaultConfig))
const pId = PeerId.create({ bits: 32 }).toJSON()
const pId = PeerId.create({ bits: 512 }).toJSON()
config.Identity.PeerID = pId.id
config.Identity.PrivKey = pId.privKey
}
Expand All @@ -53,7 +53,7 @@ function Factory () {

// create the IPFS node
const ipfs = new IPFS(repo)
ipfs.init({ emptyRepo: true }, (err) => {
ipfs.init({ emptyRepo: true, bits: 512 }, (err) => {
if (err) {
return callback(err)
}
Expand Down
2 changes: 1 addition & 1 deletion test/utils/temp-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function createTempNode (num, callback) {
num = leftPad(num, 3, 0)

series([
(cb) => ipfs.init({ emptyRepo: true }, cb),
(cb) => ipfs.init({ emptyRepo: true, bits: 512 }, cb),
(cb) => setAddresses(repo, num, cb),
(cb) => ipfs.load(cb)
], (err) => {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/temp-repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function createTempRepo () {
}

var repo = new IPFSRepo(repoPath, {
bits: 64,
bits: 512,
stores: store
})

Expand Down

0 comments on commit 2b98773

Please sign in to comment.