-
Notifications
You must be signed in to change notification settings - Fork 1.2k
test: 'get recursive' test #741
Conversation
test/cli/test-files.js
Outdated
| return ipfs('files get QmUhUuiTKkkK8J6JZ9zmj8iNHPuNfGYcszgRumzhHBxEEU').then((out) => { | ||
| const directory = path.join(process.cwd(), 'QmUhUuiTKkkK8J6JZ9zmj8iNHPuNfGYcszgRumzhHBxEEU') | ||
| expect(fs.readdirSync(directory).length).to.be.eql(8) | ||
| // TODO add assertion on content of files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@victorbjelkholm your turn, tests are passing :)
(also, make sure to unlink to delete that file, like the other tests do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pgte @diasdavid hm, it's not passing for me, getting:
1) cli --all files with daemon off (requiring js-ipfs core directly) get recursively:
AssertionError: expected 1 to deeply equal 8
+ expected - actual
-1
+8
at ipfs.then (test/cli/test-files.js:96:56)
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
2) cli --all files with daemon on (contacting js-ipfs through http-api) get recursively:
AssertionError: expected 1 to deeply equal 8
+ expected - actual
-1
+8
at ipfs.then (test/cli/test-files.js:96:56)
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
Seems it's only pulling down one file rather than 8...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try again (fresh npm install)
…ut the differences if there are any
| it('add recursively test 1', () => { | ||
| return ipfs('files add -r src/init-files/init-docs').then((out) => { | ||
| it('add recursively test', () => { | ||
| return ipfs('files add -r test/test-data/recursive-get-dir').then((out) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for creating a folder that will stay immutable, this will save time in the future :)
daviddias
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just needs a 'console.log' removed, otherwise LGTM :)
test/cli/test-files.js
Outdated
| const outDir = path.join(process.cwd(), 'QmYmW4HiZhotsoSqnv2o1oUusvkRM8b9RweBoH7ao5nki2') | ||
| rimraf(outDir) | ||
| return ipfs('files get QmYmW4HiZhotsoSqnv2o1oUusvkRM8b9RweBoH7ao5nki2').then((out) => { | ||
| console.log(out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover
|
I've been seeing the |
|
@diasdavid I haven't been able to make it fail locally.. |
|
I just tried again to see my luck and I got it to fail with the error: |
|
@diasdavid correction: I was able to reproduce this. Investigating. |
Adding since Github acted weird and closed #736