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

Commit

Permalink
fix: repo interop
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Aug 7, 2018
1 parent 6593ccd commit 79b7182
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions test/repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe.skip('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 @@ -91,26 +91,34 @@ describe.skip('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 79b7182

Please sign in to comment.