Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit f974115

Browse files
committed
fix: ipns tests using go daemon
1 parent 776dc09 commit f974115

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

js/src/name/publish.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = (createCommon, options) => {
3939
after((done) => common.teardown(done))
4040

4141
it('should publish an IPNS record with the default params', function (done) {
42-
this.timeout(50 * 1000)
42+
this.timeout(120 * 1000)
4343

4444
const value = fixture.cid
4545

@@ -54,7 +54,7 @@ module.exports = (createCommon, options) => {
5454
})
5555

5656
it('should publish correctly when the file was not added but resolve is disabled', function (done) {
57-
this.timeout(50 * 1000)
57+
this.timeout(120 * 1000)
5858

5959
const value = 'QmPFVLPmp9zv5Z5KUqLhe2EivAGccQW2r7M7jhVJGLZoZU'
6060

@@ -76,7 +76,7 @@ module.exports = (createCommon, options) => {
7676
})
7777

7878
it('should publish with a key received as param, instead of using the key of the node', function (done) {
79-
this.timeout(90 * 1000)
79+
this.timeout(140 * 1000)
8080

8181
const value = fixture.cid
8282
const options = {

js/src/name/resolve.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = (createCommon, options) => {
4141
after((done) => common.teardown(done))
4242

4343
it('should resolve a record with the default params after a publish', function (done) {
44-
this.timeout(50 * 1000)
44+
this.timeout(120 * 1000)
4545

4646
const value = fixture.cid
4747

@@ -52,22 +52,20 @@ module.exports = (createCommon, options) => {
5252
ipfs.name.resolve(nodeId, (err, res) => {
5353
expect(err).to.not.exist()
5454
expect(res).to.exist()
55-
expect(res.path).to.equal(`/ipfs/${value}`)
55+
expect(res.path || res).to.equal(`/ipfs/${value}`) // TODO
5656

5757
done()
5858
})
5959
})
6060
})
6161

6262
it('should not get the entry if its validity time expired', function (done) {
63-
this.timeout(50 * 1000)
63+
this.timeout(140 * 1000)
6464

6565
const value = fixture.cid
6666
const publishOptions = {
67-
resolve: true,
68-
lifetime: '1ms',
69-
ttl: '10s',
70-
key: 'self'
67+
resolve: false,
68+
lifetime: '10ms'
7169
}
7270

7371
ipfs.name.publish(value, publishOptions, (err, res) => {
@@ -83,12 +81,12 @@ module.exports = (createCommon, options) => {
8381

8482
done()
8583
})
86-
}, 1)
84+
}, 10)
8785
})
8886
})
8987

9088
it('should recursively resolve to an IPFS hash', function (done) {
91-
this.timeout(100 * 1000)
89+
this.timeout(150 * 1000)
9290

9391
const value = fixture.cid
9492
const publishOptions = {
@@ -125,7 +123,7 @@ module.exports = (createCommon, options) => {
125123
ipfs.name.resolve(keyId, resolveOptions, (err, res) => {
126124
expect(err).to.not.exist()
127125
expect(res).to.exist()
128-
expect(res.path).to.equal(`/ipfs/${value}`)
126+
expect(res.path || res).to.equal(`/ipfs/${value}`) // TODO
129127

130128
done()
131129
})

0 commit comments

Comments
 (0)