Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
chore: update js-ipfs version
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Oct 1, 2018
1 parent b371bd5 commit c374b7f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"form-data": "^2.3.2",
"go-ipfs-dep": "~0.4.17",
"hat": "0.0.3",
"ipfs": "~0.32.0",
"ipfs": "~0.32.3",
"ipfs-api": "^24.0.0",
"ipfsd-ctl": "~0.39.1",
"ipfs-unixfs": "~0.1.15",
Expand Down
4 changes: 2 additions & 2 deletions test/ipns.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const publishAndResolve = (publisherDaemon, resolverDaemon, callback) => {
sameDaemon = true
}

const stopAndStartSecondDaemon = (callback) => {
const stopPublisherAndStartResolverDaemon = (callback) => {
if (sameDaemon) {
return callback()
}
Expand All @@ -65,7 +65,7 @@ const publishAndResolve = (publisherDaemon, resolverDaemon, callback) => {
cb()
}),
(cb) => publisherDaemon.api.name.publish(ipfsRef, { resolve: false }, cb),
(cb) => stopAndStartSecondDaemon(cb),
(cb) => stopPublisherAndStartResolverDaemon(cb),
(cb) => {
resolverDaemon.api.name.resolve(nodeId, { local: true }, (err, res) => {
expect(err).to.not.exist()
Expand Down
2 changes: 1 addition & 1 deletion test/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require('./pubsub')
require('./circuit')
require('./repo')
require('./exchange-files')
require('./ipns')
require('./kad-dht')
require('./pin')
require('./files')
require('./ipns')
30 changes: 19 additions & 11 deletions test/repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('repo', () => {
})

it('read repo: js -> go', function (done) {
this.timeout(50 * 1000)
this.timeout(80 * 1000)
const dir = path.join(os.tmpdir(), hat())
const data = crypto.randomBytes(1024 * 5)

Expand All @@ -88,26 +88,34 @@ describe('repo', () => {
series([
(cb) => jsDf.spawn({
repoPath: dir,
disposable: false,
initOptions: { bits: 512 }
}, cb),
(node, cb) => {
}, (err, node) => {
expect(err).to.not.exist()

jsDaemon = node
cb()
},
(cb) => jsDaemon.api.add(data, cb),
(res, cb) => {
jsDaemon.init(cb)
}),
(cb) => jsDaemon.start(cb),

(cb) => jsDaemon.api.add(data, (err, res) => {
expect(err).to.not.exist()

hash = res[0].hash
catAndCheck(jsDaemon.api, hash, data, cb)
},
}),
(cb) => jsDaemon.stop(cb),
(cb) => goDf.spawn({
repoPath: dir,
disposable: false,
initOptions: { bits: 1024 }
}, cb),
(node, cb) => {
}, (err, node) => {
expect(err).to.not.exist()

goDaemon = node
cb()
},
}),
(cb) => goDaemon.start(cb),
(cb) => catAndCheck(goDaemon.api, hash, data, cb),
(cb) => goDaemon.stop(cb)
], done)
Expand Down

0 comments on commit c374b7f

Please sign in to comment.