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

Commit 92b0594

Browse files
obo20Alan Shaw
authored and
Alan Shaw
committed
fix: allow passing timeout option to object stat (#1055)
The ipfs object stat command couldn't handle the {timeout: '1s'} option (or any other options). We're already checking for the opts parameter so it makes sense that we should be sending it as well. Things work as desired now with this one line addition.
1 parent 42626d8 commit 92b0594

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"cross-env": "^5.2.0",
8787
"dirty-chai": "^2.0.1",
8888
"go-ipfs-dep": "~0.4.21",
89-
"interface-ipfs-core": "^0.107.1",
89+
"interface-ipfs-core": "^0.109.0",
9090
"ipfsd-ctl": "~0.43.0",
9191
"nock": "^10.0.2",
9292
"stream-equal": "^1.1.1"

src/object/stat.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ module.exports = (send) => {
2121

2222
send({
2323
path: 'object/stat',
24-
args: cid.toString()
24+
args: cid.toString(),
25+
qs: opts
2526
}, callback)
2627
})
2728
}

test/interface.spec.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ describe('interface-ipfs-core tests', () => {
4949
{
5050
name: 'replace',
5151
reason: 'FIXME Waiting for fix on go-ipfs https://github.com/ipfs/js-ipfs-http-client/pull/307#discussion_r69281789 and https://github.com/ipfs/go-ipfs/issues/2927'
52+
},
53+
// config.profile
54+
{
55+
name: 'profile',
56+
reason: 'TODO not yet implemented https://github.com/ipfs/js-ipfs-http-client/pull/1030'
5257
}
5358
]
5459
})
@@ -182,7 +187,14 @@ describe('interface-ipfs-core tests', () => {
182187
]
183188
})
184189

185-
tests.filesMFS(defaultCommonFactory)
190+
tests.filesMFS(defaultCommonFactory, {
191+
skip: [
192+
{
193+
name: 'should ls directory with long option',
194+
reason: 'TODO unskip when go-ipfs supports --long https://github.com/ipfs/go-ipfs/pull/6528'
195+
}
196+
]
197+
})
186198

187199
tests.key(defaultCommonFactory, {
188200
skip: [

0 commit comments

Comments
 (0)