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

WIP: tests: new expected hashes and sizes for the new unixfs-engine defaul… #705

Closed
wants to merge 1 commit into from
Closed
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
26 changes: 13 additions & 13 deletions test/cli/test-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,33 @@ describe('files', () => {
it('add', () => {
return ipfs('files add src/init-files/init-docs/readme').then((out) => {
expect(out).to.be.eql(
'added QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB readme'
'added QmWttNAA5JNh8CPLHucifgpqJqe82kmKG4hiw2uq7iuLXB readme'
)
})
})

it('add alias', () => {
return ipfs('add src/init-files/init-docs/readme').then((out) => {
expect(out).to.be.eql(
'added QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB readme'
'added QmWttNAA5JNh8CPLHucifgpqJqe82kmKG4hiw2uq7iuLXB readme'
)
})
})

it('add recursively', () => {
return ipfs('files add -r src/init-files/init-docs').then((out) => {
expect(out).to.be.eql([
'added QmYE7xo6NxbHEVEHej1yzxijYaNY51BaeKxjXxn6Ssa6Bs init-docs/tour/0.0-intro',
'added QmciSU8hfpAXKjvK5YLUSwApomGSWN5gFbP4EpDAEzu2Te init-docs/tour',
'added QmTumTjvcYCAvRRwQ8sDRxh8ezmrcr88YFU7iYNroGGTBZ init-docs/security-notes',
'added QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB init-docs/readme',
'added QmdncfsVm2h5Kqq9hPmU7oAVX2zTSVP3L869tgTbPYnsha init-docs/quick-start',
'added QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7 init-docs/help',
'added QmQN88TEidd3RY2u3dpib49fERTDfKtDpvxnvczATNsfKT init-docs/docs/index',
'added QmegvLXxpVKiZ4b57Xs1syfBVRd8CbucVHAp7KpLQdGieC init-docs/docs',
'added QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y init-docs/contact',
'added QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V init-docs/about',
'added QmUhUuiTKkkK8J6JZ9zmj8iNHPuNfGYcszgRumzhHBxEEU init-docs'
'added QmaGE6DRwomWZxau96Hx6cdjYYYfVsp89o8gHaQbHiWWuc init-docs/tour/0.0-intro',
'added QmWDvFCCGNeLAz2ASvhYvjwY1fqv1kgZYu3PoyPvNBUggF init-docs/tour',
'added QmNtK7DiXysCe5RvAe4VqxrbphHMVAzrSFsKHGUrJQvVvZ init-docs/security-notes',
'added QmWttNAA5JNh8CPLHucifgpqJqe82kmKG4hiw2uq7iuLXB init-docs/readme',
'added QmfQ6dVwcmNcXscwHSdHAn5Rhz9THHxc8r1EAH1W4QqyX9 init-docs/quick-start',
'added QmU1sw7VjE4dqESBHcowgPd2W4e7Pf4KvXptaDCZCCBYZs init-docs/help',
'added QmfSgwmt9u6L6vgio3DY8ZgeJjeSKEJTuysi3vkRyS9gTY init-docs/docs/index',
'added QmXPKvjP6hbd9zwHthuVqiqXoLCdQkaqi6svb8Fd7G7QsE init-docs/docs',
'added QmNifNEbdZzs1D8XSBaNVNnVNhwzjDm6tSR72km9HF5Jti init-docs/contact',
'added QmUKsDvy7spk3UwF3fkxfm6fqw9zb6nrEkiVypd6Es3M6b init-docs/about',
'added QmZ6Pwevfnbx6L15wX2ftHGTi7Ed2Jnh6H4GyHbwLsUK6o init-docs'
].join('\n'))
})
})
Expand Down
4 changes: 2 additions & 2 deletions test/core/node-only/test-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('init (Node.js specific)', () => {
it('init docs are written', (done) => {
ipfs.init({ bits: 1024 }, (err) => {
expect(err).to.not.exist
const multihash = new Buffer('12205e7c3ce237f936c76faf625e90f7751a9f5eeb048f59873303c215e9cce87599', 'hex')
const multihash = new Buffer('12209fc9ba7a2c3de39e9460e76ee392b460fb404a22b7e24d95f3c90bfeb3c24290', 'hex')

setTimeout(() => {
ipfs.object.get(multihash, {}, (err, node) => {
Expand All @@ -40,7 +40,7 @@ describe('init (Node.js specific)', () => {
expect(err).to.not.exist

// Check for default assets
var multihash = new Buffer('12205e7c3ce237f936c76faf625e90f7751a9f5eeb048f59873303c215e9cce87599', 'hex')
var multihash = new Buffer('12209fc9ba7a2c3de39e9460e76ee392b460fb404a22b7e24d95f3c90bfeb3c24290', 'hex')
ipfs.object.get(multihash, {}, (err, node) => {
expect(err).to.exist
done()
Expand Down