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

Commit

Permalink
chore: add interface-ipfs-core tests for pin to ipfs-message-port-client
Browse files Browse the repository at this point in the history
  • Loading branch information
icidasset committed Feb 24, 2021
1 parent e8236c4 commit dd8fa53
Showing 1 changed file with 166 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ describe('interface-ipfs-core tests', () => {
name: 'should remove by CID in buffer',
reason: 'Passing CID as Buffer is not supported'
},
{
name: 'should error when removing pinned blocks',
reason: 'ipfs.pin.add is not implemented'
},

{
name: 'should remove multiple CIDs',
reason: 'times out'
Expand All @@ -167,4 +162,170 @@ describe('interface-ipfs-core tests', () => {
}
]
})

tests.pin(factory, {
skip: [
// pin.add
{
name: 'should add a CID and return the added CID',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should add a pin with options and return the added CID',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should add recursively',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should add directly',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should recursively pin parent of direct pin',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should fail to directly pin a recursive pin',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should fail to pin a hash not in datastore',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'needs all children in datastore to pin recursively',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should pin dag-cbor',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should pin raw',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should pin dag-cbor with dag-pb child',
reason: 'ipfs.pin.ls is not implemented'
},
// pin.addAll
{
name: 'should add an array of CIDs',
reason: 'ipfs.pin.addAll is not implemented'
},
{
name: 'should add a generator of CIDs',
reason: 'ipfs.pin.addAll is not implemented'
},
{
name: 'should add an async generator of CIDs',
reason: 'ipfs.pin.addAll is not implemented'
},
{
name: 'should add an array of pins with options',
reason: 'ipfs.pin.addAll is not implemented'
},
{
name: 'should add a generator of pins with options',
reason: 'ipfs.pin.addAll is not implemented'
},
{
name: 'should add an async generator of pins with options',
reason: 'ipfs.pin.addAll is not implemented'
},
{
name: 'should respect timeout option when pinning a block',
reason: 'ipfs.pin.addAll is not implemented'
},
// pin.ls
{
name: 'should respect timeout option when listing pins',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list all recursive pins',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list all indirect pins',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list all types of pins',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list all direct pins',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list pins for a specific hash',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should throw an error on missing direct pins for existing path',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should throw an error on missing link for a specific path',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list indirect pins for a specific path',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list recursive pins for a specific hash',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list pins for multiple CIDs',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should throw error for invalid non-string pin type option',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should throw error for invalid string pin type option',
reason: 'ipfs.pin.ls is not implemented'
},
{
name: 'should list pins with metadata',
reason: 'ipfs.pin.ls is not implemented'
},
// pin.rm
{
name: 'should respect timeout option when unpinning a block',
reason: 'ipfs.pin.rm is not implemented'
},
{
name: 'should remove a recursive pin',
reason: 'ipfs.pin.rm is not implemented'
},
{
name: 'should remove a direct pin',
reason: 'ipfs.pin.rm is not implemented'
},
{
name: 'should fail to remove an indirect pin',
reason: 'ipfs.pin.rm is not implemented'
},
{
name: 'should fail when an item is not pinned',
reason: 'ipfs.pin.rm is not implemented'
},
// pin.rmAll
{
name: 'should respect timeout option when unpinning a block',
reason: 'ipfs.pin.rmAll is not implemented'
},
{
name: 'should pipe the output of ls to rm',
reason: 'ipfs.pin.rmAll is not implemented'
},
]
})
})

0 comments on commit dd8fa53

Please sign in to comment.