From 79b7182eba551a5620c01f6e5b28941beeb4e1f9 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Sun, 22 Jul 2018 17:27:02 +0100 Subject: [PATCH 1/2] fix: repo interop --- test/repo.js | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/test/repo.js b/test/repo.js index 37cc3120..96484bad 100644 --- a/test/repo.js +++ b/test/repo.js @@ -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) @@ -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) From b4138b7f7b481e48bfb5f7215b6695c56d5152d5 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Thu, 9 Aug 2018 14:41:02 +0100 Subject: [PATCH 2/2] fix: removed skip test --- test/repo.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/repo.js b/test/repo.js index 96484bad..47123203 100644 --- a/test/repo.js +++ b/test/repo.js @@ -26,10 +26,7 @@ function catAndCheck (api, hash, data, callback) { }) } -// The repo was again changed on go-ipfs 0.4.16 -// TODO: create spec tests for repo -describe.skip('repo', () => { - // skipping until https://github.com/ipfs/interop/issues/8 is addressed +describe('repo', () => { if (isWindows) { return }