From a94d80b9b36ce35d9c07d65e954a10417c57e9ea Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Thu, 5 Jul 2018 15:38:00 +0100 Subject: [PATCH 1/5] feat: ipns working locally --- js/src/index.js | 1 + js/src/name/index.js | 9 +++ js/src/name/publish.js | 96 ++++++++++++++++++++++++++++++++ js/src/name/resolve.js | 123 +++++++++++++++++++++++++++++++++++++++++ js/src/name/utils.js | 13 +++++ 5 files changed, 242 insertions(+) create mode 100644 js/src/name/index.js create mode 100644 js/src/name/publish.js create mode 100644 js/src/name/resolve.js create mode 100644 js/src/name/utils.js diff --git a/js/src/index.js b/js/src/index.js index 9da38f20e..81b9eb96c 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -10,6 +10,7 @@ exports.files = require('./files') exports.key = require('./key') exports.ls = require('./ls') exports.miscellaneous = require('./miscellaneous') +exports.name = require('./name') exports.object = require('./object') exports.pin = require('./pin') exports.ping = require('./ping') diff --git a/js/src/name/index.js b/js/src/name/index.js new file mode 100644 index 000000000..a11b2969e --- /dev/null +++ b/js/src/name/index.js @@ -0,0 +1,9 @@ +'use strict' +const { createSuite } = require('../utils/suite') + +const tests = { + publish: require('./publish'), + resolve: require('./resolve') +} + +module.exports = createSuite(tests) diff --git a/js/src/name/publish.js b/js/src/name/publish.js new file mode 100644 index 000000000..e43d82805 --- /dev/null +++ b/js/src/name/publish.js @@ -0,0 +1,96 @@ +/* eslint-env mocha */ +'use strict' + +const each = require('async/each') +const hat = require('hat') + +const { fixtures } = require('./utils') +const { getDescribe, getIt, expect } = require('../utils/mocha') + +module.exports = (createCommon, options) => { + const describe = getDescribe(options) + const it = getIt(options) + const common = createCommon() + + describe('.name.publish', function () { + this.timeout(50 * 1000) + + const keyName = hat() + let ipfs + let nodeId + let keyId + + before(function (done) { + this.timeout(60 * 1000) + + common.setup((err, factory) => { + expect(err).to.not.exist() + + factory.spawnNode((err, node) => { + expect(err).to.not.exist() + + ipfs = node + ipfs.id().then((res) => { + expect(res.id).to.exist() + + nodeId = res.id + + ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, (err, key) => { + expect(err).to.not.exist() + expect(key).to.exist() + expect(key).to.have.property('name', keyName) + expect(key).to.have.property('id') + + keyId = key.id + populate() + }) + }) + }) + }) + + function populate () { + each(fixtures.files, (file, cb) => { + ipfs.files.add(file.data, { pin: false }, cb) + }, done) + } + }) + + after((done) => common.teardown(done)) + + it('name publish should publish correctly', (done) => { + const value = fixtures.files[0].cid + + ipfs.name.publish(value, true, '1m', '10s', 'self', (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + expect(res).to.equal(nodeId) + + done() + }) + }) + + it('name publish should publish correctly when the file was not added but resolve is disabled', (done) => { + const value = 'QmPFVLPmp9zv5Z5KUqLhe2EivAGccQW2r7M7jhVJGLZoZU' + + ipfs.name.publish(value, false, '1m', '10s', 'self', (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + expect(res).to.equal(nodeId) + + done() + }) + }) + + it('name publish should publish correctly when a new key is used', (done) => { + const value = fixtures.files[0].cid + + ipfs.name.publish(value, false, '24h', '10s', keyName, (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + expect(res).to.equal(keyId) + + done() + }) + }) + }) +} diff --git a/js/src/name/resolve.js b/js/src/name/resolve.js new file mode 100644 index 000000000..2be30d7e1 --- /dev/null +++ b/js/src/name/resolve.js @@ -0,0 +1,123 @@ +/* eslint-env mocha */ +'use strict' + +const each = require('async/each') +const hat = require('hat') + +const { fixtures } = require('./utils') +const { getDescribe, getIt, expect } = require('../utils/mocha') + +module.exports = (createCommon, options) => { + const describe = getDescribe(options) + const it = getIt(options) + const common = createCommon() + + describe('.name.resolve', function () { + this.timeout(50 * 1000) + + const keyName = hat() + let ipfs + let nodeId + let keyId + + before(function (done) { + this.timeout(60 * 1000) + + common.setup((err, factory) => { + expect(err).to.not.exist() + + factory.spawnNode((err, node) => { + expect(err).to.not.exist() + + ipfs = node + ipfs.id().then((res) => { + expect(res.id).to.exist() + + nodeId = res.id + + ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, (err, key) => { + expect(err).to.not.exist() + expect(key).to.exist() + expect(key).to.have.property('name', keyName) + expect(key).to.have.property('id') + + keyId = key.id + populate() + }) + }) + }) + }) + + function populate () { + each(fixtures.files, (file, cb) => { + ipfs.files.add(file.data, { pin: false }, cb) + }, done) + } + }) + + after((done) => common.teardown(done)) + + it('name resolve should resolve correctly after a publish', (done) => { + this.timeout(60 * 1000) + + const value = fixtures.files[0].cid + + ipfs.name.publish(value, true, '1m', '10s', 'self', (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + + ipfs.name.resolve(nodeId, false, false, (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + expect(res).to.equal(`/ipfs/${value}`) + + done() + }) + }) + }) + + it('name resolve should not get the entry correctly if its validity time expired', (done) => { + this.timeout(60 * 1000) + + const value = fixtures.files[0].cid + + ipfs.name.publish(value, true, '10ns', '10s', 'self', (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + + setTimeout(function () { + ipfs.name.resolve(nodeId, false, false, (err, res) => { + expect(err).to.exist() + expect(res).to.not.exist() + + done() + }) + }, 1) + }) + }) + + it('name resolve should should go recursively until finding an ipfs hash', (done) => { + this.timeout(60 * 1000) + + const value = fixtures.files[0].cid + + ipfs.name.publish(value, true, '24h', '10s', 'self', (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + + ipfs.name.publish(`/ipns/${nodeId}`, true, '24h', '10s', keyName, (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + + ipfs.name.resolve(keyId, false, true, (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + expect(res).to.equal(`/ipfs/${value}`) + + done() + }) + }) + }) + }) + }) +} diff --git a/js/src/name/utils.js b/js/src/name/utils.js new file mode 100644 index 000000000..5f1add5ce --- /dev/null +++ b/js/src/name/utils.js @@ -0,0 +1,13 @@ +'use strict' + +const loadFixture = require('aegir/fixtures') + +exports.fixtures = Object.freeze({ + files: Object.freeze([Object.freeze({ + data: loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core'), + cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' + }), Object.freeze({ + data: loadFixture('js/test/fixtures/test-folder/files/hello.txt', 'interface-ipfs-core'), + cid: 'QmY9cxiHqTFoWamkQVkpmmqzBrY3hCBEL2XNu3NtX74Fuu' + })]) +}) From 29d9e48936adf0f962f3eeda84991f3ecc7cb827 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Sat, 21 Jul 2018 15:53:44 +0100 Subject: [PATCH 2/5] fix: code review --- js/src/name/publish.js | 85 ++++++++++++++++++---------------- js/src/name/resolve.js | 102 +++++++++++++++++++++++------------------ js/src/name/utils.js | 11 ++--- 3 files changed, 106 insertions(+), 92 deletions(-) diff --git a/js/src/name/publish.js b/js/src/name/publish.js index e43d82805..fa68b6f99 100644 --- a/js/src/name/publish.js +++ b/js/src/name/publish.js @@ -1,10 +1,10 @@ /* eslint-env mocha */ 'use strict' -const each = require('async/each') const hat = require('hat') -const { fixtures } = require('./utils') +const { fixture } = require('./utils') +const { spawnNodeWithId } = require('../utils/spawn') const { getDescribe, getIt, expect } = require('../utils/mocha') module.exports = (createCommon, options) => { @@ -13,83 +13,90 @@ module.exports = (createCommon, options) => { const common = createCommon() describe('.name.publish', function () { - this.timeout(50 * 1000) - const keyName = hat() let ipfs let nodeId - let keyId before(function (done) { + // CI takes longer to instantiate the daemon, so we need to increase the + // timeout for the before step this.timeout(60 * 1000) common.setup((err, factory) => { expect(err).to.not.exist() - factory.spawnNode((err, node) => { + spawnNodeWithId(factory, (err, node) => { expect(err).to.not.exist() ipfs = node - ipfs.id().then((res) => { - expect(res.id).to.exist() - - nodeId = res.id + nodeId = node.peerId.id - ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, (err, key) => { - expect(err).to.not.exist() - expect(key).to.exist() - expect(key).to.have.property('name', keyName) - expect(key).to.have.property('id') - - keyId = key.id - populate() - }) - }) + ipfs.files.add(fixture.data, { pin: false }, done) }) }) - - function populate () { - each(fixtures.files, (file, cb) => { - ipfs.files.add(file.data, { pin: false }, cb) - }, done) - } }) after((done) => common.teardown(done)) - it('name publish should publish correctly', (done) => { - const value = fixtures.files[0].cid + it('should publish an IPNS record with the default params', (done) => { + this.timeout(50 * 1000) + + const value = fixture.cid - ipfs.name.publish(value, true, '1m', '10s', 'self', (err, res) => { + ipfs.name.publish(value, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res).to.equal(nodeId) + expect(res.Name).to.equal(nodeId) + expect(res.Value).to.equal(`/ipfs/${value}`) done() }) }) - it('name publish should publish correctly when the file was not added but resolve is disabled', (done) => { + it('should publish correctly when the file was not added but resolve is disabled', (done) => { + this.timeout(50 * 1000) + const value = 'QmPFVLPmp9zv5Z5KUqLhe2EivAGccQW2r7M7jhVJGLZoZU' - ipfs.name.publish(value, false, '1m', '10s', 'self', (err, res) => { + const options = { + resolve: false, + lifetime: '1m', + ttl: '10s', + key: 'self' + } + + ipfs.name.publish(value, options, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res).to.equal(nodeId) + expect(res.Name).to.equal(nodeId) + expect(res.Value).to.equal(`/ipfs/${value}`) done() }) }) - it('name publish should publish correctly when a new key is used', (done) => { - const value = fixtures.files[0].cid + it('should recursively resolve to an IPFS hash', (done) => { + this.timeout(90 * 1000) + + const value = fixture.cid + const options = { + resolve: false, + lifetime: '24h', + ttl: '10s', + key: keyName + } - ipfs.name.publish(value, false, '24h', '10s', keyName, (err, res) => { + ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, (err, key) => { expect(err).to.not.exist() - expect(res).to.exist() - expect(res).to.equal(keyId) - done() + ipfs.name.publish(value, options, (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + expect(res.Name).to.equal(key.id) + expect(res.Value).to.equal(`/ipfs/${value}`) + + done() + }) }) }) }) diff --git a/js/src/name/resolve.js b/js/src/name/resolve.js index 2be30d7e1..618c122f1 100644 --- a/js/src/name/resolve.js +++ b/js/src/name/resolve.js @@ -1,10 +1,11 @@ +/* eslint max-nested-callbacks: ["error", 6] */ /* eslint-env mocha */ 'use strict' -const each = require('async/each') const hat = require('hat') -const { fixtures } = require('./utils') +const { fixture } = require('./utils') +const { spawnNodeWithId } = require('../utils/spawn') const { getDescribe, getIt, expect } = require('../utils/mocha') module.exports = (createCommon, options) => { @@ -13,80 +14,68 @@ module.exports = (createCommon, options) => { const common = createCommon() describe('.name.resolve', function () { - this.timeout(50 * 1000) - const keyName = hat() let ipfs let nodeId let keyId before(function (done) { + // CI takes longer to instantiate the daemon, so we need to increase the + // timeout for the before step this.timeout(60 * 1000) common.setup((err, factory) => { expect(err).to.not.exist() - factory.spawnNode((err, node) => { + spawnNodeWithId(factory, (err, node) => { expect(err).to.not.exist() ipfs = node - ipfs.id().then((res) => { - expect(res.id).to.exist() - - nodeId = res.id - - ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, (err, key) => { - expect(err).to.not.exist() - expect(key).to.exist() - expect(key).to.have.property('name', keyName) - expect(key).to.have.property('id') + nodeId = node.peerId.id - keyId = key.id - populate() - }) - }) + ipfs.files.add(fixture.data, { pin: false }, done) }) }) - - function populate () { - each(fixtures.files, (file, cb) => { - ipfs.files.add(file.data, { pin: false }, cb) - }, done) - } }) after((done) => common.teardown(done)) - it('name resolve should resolve correctly after a publish', (done) => { - this.timeout(60 * 1000) + it('should resolve a record with the default params after a publish', (done) => { + this.timeout(50 * 1000) - const value = fixtures.files[0].cid + const value = fixture.cid - ipfs.name.publish(value, true, '1m', '10s', 'self', (err, res) => { + ipfs.name.publish(value, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - ipfs.name.resolve(nodeId, false, false, (err, res) => { + ipfs.name.resolve(nodeId, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res).to.equal(`/ipfs/${value}`) + expect(res.Path).to.equal(`/ipfs/${value}`) done() }) }) }) - it('name resolve should not get the entry correctly if its validity time expired', (done) => { - this.timeout(60 * 1000) + it('should not get the entry if its validity time expired', (done) => { + this.timeout(50 * 1000) - const value = fixtures.files[0].cid + const value = fixture.cid + const publishOptions = { + resolve: true, + lifetime: '1ms', + ttl: '10s', + key: 'self' + } - ipfs.name.publish(value, true, '10ns', '10s', 'self', (err, res) => { + ipfs.name.publish(value, publishOptions, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() setTimeout(function () { - ipfs.name.resolve(nodeId, false, false, (err, res) => { + ipfs.name.resolve(nodeId, (err, res) => { expect(err).to.exist() expect(res).to.not.exist() @@ -96,25 +85,48 @@ module.exports = (createCommon, options) => { }) }) - it('name resolve should should go recursively until finding an ipfs hash', (done) => { - this.timeout(60 * 1000) + it('should recursively resolve to an IPFS hash', (done) => { + this.timeout(100 * 1000) - const value = fixtures.files[0].cid + const value = fixture.cid + const publishOptions = { + resolve: true, + lifetime: '24h', + ttl: '10s', + key: 'self' + } - ipfs.name.publish(value, true, '24h', '10s', 'self', (err, res) => { + // Generate new key + ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, (err, key) => { expect(err).to.not.exist() - expect(res).to.exist() - ipfs.name.publish(`/ipns/${nodeId}`, true, '24h', '10s', keyName, (err, res) => { + keyId = key.id + + // publish ipfs + ipfs.name.publish(value, publishOptions, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - ipfs.name.resolve(keyId, false, true, (err, res) => { + publishOptions.key = keyName + + // publish ipns with the generated key + ipfs.name.publish(`/ipns/${nodeId}`, publishOptions, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res).to.equal(`/ipfs/${value}`) - done() + const resolveOptions = { + nocache: false, + recursive: true + } + + // recursive resolve (will get ipns first, and will resolve again to find the ipfs) + ipfs.name.resolve(keyId, resolveOptions, (err, res) => { + expect(err).to.not.exist() + expect(res).to.exist() + expect(res.Path).to.equal(`/ipfs/${value}`) + + done() + }) }) }) }) diff --git a/js/src/name/utils.js b/js/src/name/utils.js index 5f1add5ce..61bcdcbad 100644 --- a/js/src/name/utils.js +++ b/js/src/name/utils.js @@ -2,12 +2,7 @@ const loadFixture = require('aegir/fixtures') -exports.fixtures = Object.freeze({ - files: Object.freeze([Object.freeze({ - data: loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core'), - cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' - }), Object.freeze({ - data: loadFixture('js/test/fixtures/test-folder/files/hello.txt', 'interface-ipfs-core'), - cid: 'QmY9cxiHqTFoWamkQVkpmmqzBrY3hCBEL2XNu3NtX74Fuu' - })]) +exports.fixture = Object.freeze({ + data: loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core'), + cid: 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' }) From 7113139b22aaab87928f84f2f9adf5fedd7bd943 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 23 Jul 2018 18:42:32 +0100 Subject: [PATCH 3/5] fix: core with camelCase responses --- js/src/name/publish.js | 12 ++++++------ js/src/name/resolve.js | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/js/src/name/publish.js b/js/src/name/publish.js index fa68b6f99..897b58d66 100644 --- a/js/src/name/publish.js +++ b/js/src/name/publish.js @@ -46,8 +46,8 @@ module.exports = (createCommon, options) => { ipfs.name.publish(value, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res.Name).to.equal(nodeId) - expect(res.Value).to.equal(`/ipfs/${value}`) + expect(res.name).to.equal(nodeId) + expect(res.value).to.equal(`/ipfs/${value}`) done() }) @@ -68,8 +68,8 @@ module.exports = (createCommon, options) => { ipfs.name.publish(value, options, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res.Name).to.equal(nodeId) - expect(res.Value).to.equal(`/ipfs/${value}`) + expect(res.name).to.equal(nodeId) + expect(res.value).to.equal(`/ipfs/${value}`) done() }) @@ -92,8 +92,8 @@ module.exports = (createCommon, options) => { ipfs.name.publish(value, options, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res.Name).to.equal(key.id) - expect(res.Value).to.equal(`/ipfs/${value}`) + expect(res.name).to.equal(key.id) + expect(res.value).to.equal(`/ipfs/${value}`) done() }) diff --git a/js/src/name/resolve.js b/js/src/name/resolve.js index 618c122f1..8804cd487 100644 --- a/js/src/name/resolve.js +++ b/js/src/name/resolve.js @@ -52,7 +52,7 @@ module.exports = (createCommon, options) => { ipfs.name.resolve(nodeId, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res.Path).to.equal(`/ipfs/${value}`) + expect(res.path).to.equal(`/ipfs/${value}`) done() }) @@ -74,6 +74,7 @@ module.exports = (createCommon, options) => { expect(err).to.not.exist() expect(res).to.exist() + // guarantee that the record has an expired validity. setTimeout(function () { ipfs.name.resolve(nodeId, (err, res) => { expect(err).to.exist() @@ -123,7 +124,7 @@ module.exports = (createCommon, options) => { ipfs.name.resolve(keyId, resolveOptions, (err, res) => { expect(err).to.not.exist() expect(res).to.exist() - expect(res.Path).to.equal(`/ipfs/${value}`) + expect(res.path).to.equal(`/ipfs/${value}`) done() }) From 71371c8950eb72c3a8afc0007928c787e127927b Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 24 Jul 2018 11:20:36 +0100 Subject: [PATCH 4/5] fix: code review --- js/src/name/publish.js | 8 ++++---- js/src/name/resolve.js | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/js/src/name/publish.js b/js/src/name/publish.js index 897b58d66..b3567e212 100644 --- a/js/src/name/publish.js +++ b/js/src/name/publish.js @@ -38,7 +38,7 @@ module.exports = (createCommon, options) => { after((done) => common.teardown(done)) - it('should publish an IPNS record with the default params', (done) => { + it('should publish an IPNS record with the default params', function (done) { this.timeout(50 * 1000) const value = fixture.cid @@ -53,7 +53,7 @@ module.exports = (createCommon, options) => { }) }) - it('should publish correctly when the file was not added but resolve is disabled', (done) => { + it('should publish correctly when the file was not added but resolve is disabled', function (done) { this.timeout(50 * 1000) const value = 'QmPFVLPmp9zv5Z5KUqLhe2EivAGccQW2r7M7jhVJGLZoZU' @@ -75,7 +75,7 @@ module.exports = (createCommon, options) => { }) }) - it('should recursively resolve to an IPFS hash', (done) => { + it('should recursively resolve to an IPFS hash', function (done) { this.timeout(90 * 1000) const value = fixture.cid @@ -86,7 +86,7 @@ module.exports = (createCommon, options) => { key: keyName } - ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, (err, key) => { + ipfs.key.gen(keyName, { type: 'rsa', size: 2048 }, function (err, key) { expect(err).to.not.exist() ipfs.name.publish(value, options, (err, res) => { diff --git a/js/src/name/resolve.js b/js/src/name/resolve.js index 8804cd487..067f4422d 100644 --- a/js/src/name/resolve.js +++ b/js/src/name/resolve.js @@ -40,7 +40,7 @@ module.exports = (createCommon, options) => { after((done) => common.teardown(done)) - it('should resolve a record with the default params after a publish', (done) => { + it('should resolve a record with the default params after a publish', function (done) { this.timeout(50 * 1000) const value = fixture.cid @@ -59,7 +59,7 @@ module.exports = (createCommon, options) => { }) }) - it('should not get the entry if its validity time expired', (done) => { + it('should not get the entry if its validity time expired', function (done) { this.timeout(50 * 1000) const value = fixture.cid @@ -78,6 +78,7 @@ module.exports = (createCommon, options) => { setTimeout(function () { ipfs.name.resolve(nodeId, (err, res) => { expect(err).to.exist() + expect(err.message).to.equal('record has expired') expect(res).to.not.exist() done() @@ -86,12 +87,12 @@ module.exports = (createCommon, options) => { }) }) - it('should recursively resolve to an IPFS hash', (done) => { + it('should recursively resolve to an IPFS hash', function (done) { this.timeout(100 * 1000) const value = fixture.cid const publishOptions = { - resolve: true, + resolve: false, lifetime: '24h', ttl: '10s', key: 'self' From f429519151e7e66e0ab42a6c0ee99f0b24aab55c Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 24 Jul 2018 12:01:55 +0100 Subject: [PATCH 5/5] fix: code review --- js/src/name/publish.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/name/publish.js b/js/src/name/publish.js index b3567e212..3a0485c7c 100644 --- a/js/src/name/publish.js +++ b/js/src/name/publish.js @@ -75,7 +75,7 @@ module.exports = (createCommon, options) => { }) }) - it('should recursively resolve to an IPFS hash', function (done) { + it('should publish with a key received as param, instead of using the key of the node', function (done) { this.timeout(90 * 1000) const value = fixture.cid