Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pass: 'ipfs-is-awesome-software'
},
ipfsBin: findBin('go')
}
const commonFactory = createFactory(commonOptions)
tests.bitswap(commonFactory)
tests.block(commonFactory, {
skip: [{
name: 'should get a block added as CIDv1 with a CIDv0',
reason: 'go-ipfs does not support the `version` param'
}]
})
tests.bootstrap(commonFactory)
tests.config(commonFactory, {
skip: [
// config.replace
{
name: 'replace',
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'
},
{
name: 'should list config profiles',
reason: 'TODO: Not implemented in go-ipfs'
},
{
name: 'should strip private key from diff output',
reason: 'TODO: Not implemented in go-ipfs'
}
// bitswap.wantlist
{
name: 'should not get the wantlist when offline',
reason: 'FIXME go-ipfs returns an error https://github.com/ipfs/go-ipfs/issues/4078'
}
]
})
tests.block(defaultCommon, {
skip: [{
name: 'should get a block added as CIDv1 with a CIDv0',
reason: 'LITE: TODO: version param needs to be removed - not implemented in go-ipfs and not valid'
}]
})
tests.bootstrap(defaultCommon, { skip: { reason: 'LITE: not implemented yet' } })
tests.config(defaultCommon, {
// skip: [
// // config.replace
// {
// name: 'replace',
// 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'
// }
// ]
skip: { reason: 'LITE: not implemented yet' }
})
tests.dag(defaultCommon, {
// skip: [
// // dag.tree
// {
return {
setup (cb) {
factory = new IpfsFactory()
cb(null, factory)
},
teardown (cb) {
factory.dismantle(cb)
}
}
}
tests.bitswap(defaultCommonFactory, { skip: true })
tests.block(defaultCommonFactory)
tests.bootstrap(defaultCommonFactory)
tests.config(defaultCommonFactory)
tests.dag(defaultCommonFactory)
tests.dht(defaultCommonFactory, {
skip: { reason: 'TODO: DHT is not implemented in js-ipfs yet!' }
})
tests.files(defaultCommonFactory, {
skip: [
{
name: 'should add pull stream (promised)',
reason: 'https://github.com/ipfs/js-ipfs/issues/1574'
},
{
if (err) {
return cb(err)
}
nodes.push(_ipfsd)
cb(null, _ipfsd.api)
})
}
})
},
teardown: function (callback) {
parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
}
}
test.bootstrap(common)
const factoryOpts = process.env.IPFS_NODE_TYPE === 'go'
? { type: 'go' }
: { type: 'proc', exec: require('ipfs') }
const common = {
setup (cb) {
factory = new IpfsFactory(factoryOpts)
cb(null, factory)
},
teardown (cb) {
factory.dismantle(cb)
}
}
test.block(common)
test.bootstrap(common)
test.config(common)
test.dag(common)
test.dht(common)
test.files(common)
test.filesMFS(common)
test.key(common)
test.miscellaneous(common)
test.object(common)
test.pin(common)
test.ping(common)
test.pubsub(common)
test.repo(common)
test.stats(common)
test.swarm(common)
ipfsOptions: {
pass: 'ipfs-is-awesome-software'
}
}
const overrides = {
js: {
ipfsBin: './src/cli/bin.js'
}
}
const commonFactory = createFactory(commonOptions, overrides)
tests.bitswap(commonFactory)
tests.block(commonFactory)
tests.bootstrap(commonFactory)
tests.config(commonFactory)
tests.dag(commonFactory, {
skip: [{
name: 'should get only a CID, due to resolving locally only',
reason: 'Local resolve option is not implemented yet'
}, {
name: 'tree',
reason: 'dag.tree is not implemented yet'
}]
})
tests.dht(commonFactory, {
skip: {
reason: 'TODO: unskip when DHT is enabled: https://github.com/ipfs/js-ipfs/pull/1994'
if (err) {
return cb(err)
}
nodes.push(_ipfsd)
cb(null, IPFSApi(_ipfsd.apiAddr))
})
}
})
},
teardown: function (callback) {
parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
}
}
test.bootstrap(common)
if (err) {
return cb(err)
}
nodes.push(_ipfsd)
cb(null, _ipfsd.api)
})
}
})
},
teardown: function (callback) {
parallel(nodes.map((node) => (cb) => node.stop(cb)), callback)
}
}
test.bootstrap(common)
ipfsOptions: {
pass: 'ipfs-is-awesome-software'
}
}
const overrides = {
js: {
ipfsBin: './src/cli/bin.js'
}
}
const commonFactory = createFactory(commonOptions, overrides)
tests.bitswap(commonFactory)
tests.block(commonFactory)
tests.bootstrap(commonFactory)
tests.config(commonFactory)
tests.dag(commonFactory)
tests.dht(commonFactory, {
skip: {
reason: 'TODO: unskip when DHT is enabled: https://github.com/ipfs/js-ipfs/pull/1994'
}
})
tests.filesRegular(commonFactory, {
skip: isNode ? null : [{
name: 'addFromStream',
reason: 'Not designed to run in the browser'
}, {