Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

chore: update ipfs-unixfs-engine dependency #1523

Merged
merged 4 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"ipfs-multipart": "~0.1.0",
"ipfs-repo": "~0.23.1",
"ipfs-unixfs": "~0.1.15",
"ipfs-unixfs-engine": "~0.32.1",
"ipfs-unixfs-engine": "~0.32.3",
"ipld": "~0.17.3",
"ipld-dag-cbor": "~0.12.1",
"ipld-dag-pb": "~0.14.6",
Expand Down
1 change: 0 additions & 1 deletion src/cli/commands/files/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ module.exports = {
},
'raw-leaves': {
type: 'boolean',
default: false,
describe: 'Use raw blocks for leaf nodes. (experimental)'
},
'cid-version': {
Expand Down
2 changes: 1 addition & 1 deletion test/cli/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('dns', () => runOnAndOff((thing) => {
this.timeout(60 * 1000)

return ipfs('dns ipfs.io').then((res) => {
expect(res.substr(0, 6)).to.eql('/ipfs/')
expect(res.substr(0, 6)).to.eql('/ipns/')
})
})
}))
48 changes: 39 additions & 9 deletions test/cli/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,33 +205,63 @@ describe('files', () => runOnAndOff((thing) => {
})
})

it('add with cid-version=1', function () {
it('add with cid-version=1 < default max chunk size', function () {
this.timeout(30 * 1000)

return ipfs('add src/init-files/init-docs/readme --cid-version=1')
return ipfs('add test/fixtures/less-than-default-max-chunk-size --cid-version=1')
.then((out) => {
expect(out)
.to.eql('added zdj7WWeQ43G6JJvLWQWZpyHuAMq6uYWRjkBXFad11vE2LHhQ7 readme\n')
.to.eql('added zb2rhh5LdXumxQfNZCqV8pmcC56LX71ERgf2qCNQsmZnwYYx9 less-than-default-max-chunk-size\n')
})
})

it('add with cid-version=1 and raw-leaves=false', function () {
it('add with cid-version=1 > default max chunk size', function () {
this.timeout(30 * 1000)

return ipfs('add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=false')
return ipfs('add test/fixtures/greater-than-default-max-chunk-size --cid-version=1')
.then((out) => {
expect(out)
.to.eql('added zdj7WWeQ43G6JJvLWQWZpyHuAMq6uYWRjkBXFad11vE2LHhQ7 readme\n')
.to.eql('added zdj7WbyyZoWVifUHUe58SNS184PpN8qAuCP6HpAY91iA8CveT greater-than-default-max-chunk-size\n')
})
})

it('add with cid-version=1 and raw-leaves=true', function () {
it('add with cid-version=1 and raw-leaves=false < default max chunk size', function () {
this.timeout(30 * 1000)

return ipfs('add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=true')
return ipfs(`add test/fixtures/less-than-default-max-chunk-size --cid-version=1 --raw-leaves=false`)
.then((out) => {
expect(out)
.to.eql('added zdj7WiLc855B1KPRgV7Fh8ivjuAhePE1tuJafmxH5HmmSjqaD readme\n')
.to.eql('added zdj7WWPWpmpFkrWJBhUEZ4QkGumsFsEdkaaEGs7U4dzJraogp less-than-default-max-chunk-size\n')
})
})

it('add with cid-version=1 and raw-leaves=false > default max chunk size', function () {
this.timeout(30 * 1000)

return ipfs(`add test/fixtures/greater-than-default-max-chunk-size --cid-version=1 --raw-leaves=false`)
.then((out) => {
expect(out)
.to.eql('added zdj7WmYojH6vMkDQFNDNwUy2ZawrggqAhS6jjRJwb1C4KXZni greater-than-default-max-chunk-size\n')
})
})

it('add with cid-version=1 and raw-leaves=true < default max chunk size', function () {
this.timeout(30 * 1000)

return ipfs('add test/fixtures/less-than-default-max-chunk-size --cid-version=1 --raw-leaves=true')
.then((out) => {
expect(out)
.to.eql('added zb2rhh5LdXumxQfNZCqV8pmcC56LX71ERgf2qCNQsmZnwYYx9 less-than-default-max-chunk-size\n')
})
})

it('add with cid-version=1 and raw-leaves=true > default max chunk size', function () {
this.timeout(30 * 1000)

return ipfs('add test/fixtures/greater-than-default-max-chunk-size --cid-version=1 --raw-leaves=true')
.then((out) => {
expect(out)
.to.eql('added zdj7WbyyZoWVifUHUe58SNS184PpN8qAuCP6HpAY91iA8CveT greater-than-default-max-chunk-size\n')
})
})

Expand Down
Binary file not shown.
Binary file added test/fixtures/less-than-default-max-chunk-size
Binary file not shown.