diff --git a/package.json b/package.json index dce676fd..5f7af836 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,6 @@ "detect-node": "^2.0.3", "hapi": "^16.6.2", "hat": "0.0.3", - "ipfs-api": "^17.2.5", "ipfs-repo": "^0.18.5", "joi": "^13.0.2", "lodash.clone": "^4.5.0", @@ -93,6 +92,7 @@ "dirty-chai": "^2.0.1", "go-ipfs-dep": "0.4.13", "ipfs": "^0.27.5", + "ipfs-api": "^17.3.0", "is-running": "1.0.5", "mkdirp": "^0.5.1", "pre-commit": "^1.2.2", diff --git a/src/remote-node/routes.js b/src/remote-node/routes.js index 2ca40467..42f55332 100644 --- a/src/remote-node/routes.js +++ b/src/remote-node/routes.js @@ -25,7 +25,7 @@ module.exports = (server) => { path: '/spawn', handler: (request, reply) => { const payload = request.payload || {} - const ctrl = new CtrlFactory(payload.type) + const ctrl = new CtrlFactory({ type: payload.type }) ctrl.spawn(payload.opts, (err, ipfsd) => { if (err) { return reply(boom.badRequest(err)) diff --git a/test/start-stop.js b/test/start-stop.js index f716d44f..d7599a3f 100644 --- a/test/start-stop.js +++ b/test/start-stop.js @@ -45,6 +45,14 @@ module.exports = (type) => { expect(ipfsd).to.exist() }) + it('daemon exec path should match type', () => { + let execPath = type === 'js' + ? 'ipfs/src/cli/bin.js' + : 'go-ipfs-dep/go-ipfs/ipfs' + + expect(ipfsd.exec).to.have.string(execPath) + }) + it('daemon should not be running', (done) => { ipfsd.pid((pid) => { expect(pid).to.not.exist()