diff --git a/test/fixtures/go-ipfs-repo/blocks/_README b/test/fixtures/go-ipfs-repo/blocks/_README index 23cb090956..ac3b6034c3 100644 --- a/test/fixtures/go-ipfs-repo/blocks/_README +++ b/test/fixtures/go-ipfs-repo/blocks/_README @@ -6,25 +6,17 @@ All the object files are placed in a tree of directories, based on a function of the CID. This is a form of sharding similar to the objects directory in git repositories. Previously, we used prefixes, we now use the next-to-last two charters. - func NextToLast(base32cid string) { nextToLastLen := 2 offset := len(base32cid) - nextToLastLen - 1 return str[offset : offset+nextToLastLen] } - For example, an object with a base58 CIDv1 of - zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f - has a base32 CIDv1 of - BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA - and will be placed at - SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data - with 'SC' being the last-to-next two characters and the 'B' at the beginning of the CIDv1 string is the multibase prefix that is not stored in the filename. diff --git a/test/fixtures/go-ipfs-repo/config b/test/fixtures/go-ipfs-repo/config index e5d9f80cbc..00f467f95f 100644 --- a/test/fixtures/go-ipfs-repo/config +++ b/test/fixtures/go-ipfs-repo/config @@ -1,52 +1,52 @@ -{ - "Identity":{ - "PeerID":"QmQ2zigjQikYnyYUSXZydNXrDRhBut2mubwJBaLXobMt3A", - "PrivKey":"CAASpgkwggSiAgEAAoIBAQC2SKo/HMFZeBml1AF3XijzrxrfQXdJzjePBZAbdxqKR1Mc6juRHXij6HXYPjlAk01BhF1S3Ll4Lwi0cAHhggf457sMg55UWyeGKeUv0ucgvCpBwlR5cQ020i0MgzjPWOLWq1rtvSbNcAi2ZEVn6+Q2EcHo3wUvWRtLeKz+DZSZfw2PEDC+DGPJPl7f8g7zl56YymmmzH9liZLNrzg/qidokUv5u1pdGrcpLuPNeTODk0cqKB+OUbuKj9GShYECCEjaybJDl9276oalL9ghBtSeEv20kugatTvYy590wFl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CAyENY7+Pd55S8r+a+MusrMagYNljb5WbVTgN8cgdpim9lbbIFlpN6SZaVjLQL3J8TWH6wKBgQDSChzItkqWX11CNstJ9zJyUE20I7LrpyBJNgG1gtvz3ZMUQCn3PxxHtQzN9n1P0mSSYs+jBKPuoSyYLt1wwe10/lpgL4rkKWU3/m1Myt0tveJ9WcqHh6tzcAbb/fXpUFT/o4SWDimWkPkuCb+8j//2yiXk0a/T2f36zKMuZvujqQKBgC6B7BAQDG2H2B/ijofp12ejJU36nL98gAZyqOfpLJ+FeMz4TlBDQ+phIMhnHXA5UkdDapQ+zA3SrFk+6yGk9Vw4Hf46B+82SvOrSbmnMa+PYqKYIvUzR4gg34rL/7AhwnbEyD5hXq4dHwMNsIDq+l2elPjwm/U9V0gdAl2+r50HAoGALtsKqMvhv8HucAMBPrLikhXP/8um8mMKFMrzfqZ+otxfHzlhI0L08Bo3jQrb0Z7ByNY6M8epOmbCKADsbWcVre/AAY0ZkuSZK/CaOXNX/AhMKmKJh8qAOPRY02LIJRBCpfS4czEdnfUhYV/TYiFNnKRj57PPYZdTzUsxa/yVTmECgYBr7slQEjb5Onn5mZnGDh+72BxLNdgwBkhO0OCdpdISqk0F0Pxby22DFOKXZEpiyI9XYP1C8wPiJsShGm2yEwBPWXnrrZNWczaVuCbXHrZkWQogBDG3HGXNdU4MAWCyiYlyinIBpPpoAJZSzpGLmWbMWh28+RJS6AQX6KHrK1o2uw==" }, - "Datastore":{ - "Type":"", - "Path":"", - "StorageMax":"", - "StorageGCWatermark":0, - "GCPeriod":"", - "Params":null, - "NoSync":false + "Datastore": { + "Type": "", + "Path": "", + "StorageMax": "", + "StorageGCWatermark": 0, + "GCPeriod": "", + "Params": null, + "NoSync": false }, - "Addresses":{ - "Swarm":[ + "Addresses": { + "Swarm": [ "/ip4/127.0.0.1/tcp/0", "/ip4/127.0.0.1/tcp/0/ws" ], - "API":"/ip4/127.0.0.1/tcp/0", - "Gateway":"/ip4/127.0.0.1/tcp/0" + "API": "/ip4/127.0.0.1/tcp/0", + "Gateway": "/ip4/127.0.0.1/tcp/0" }, - "Mounts":{ - "IPFS":"/ipfs", - "IPNS":"/ipns", - "FuseAllowOther":false + "Mounts": { + "IPFS": "/ipfs", + "IPNS": "/ipns", + "FuseAllowOther": false }, - "Version":{ - "Current":"0.4.0-dev", - "Check":"error", - "CheckDate":"0001-01-01T00:00:00Z", - "CheckPeriod":"172800000000000", - "AutoUpdate":"minor" + "Version": { + "Current": "0.4.0-dev", + "Check": "error", + "CheckDate": "0001-01-01T00:00:00Z", + "CheckPeriod": "172800000000000", + "AutoUpdate": "minor" }, - "Discovery":{ - "MDNS":{ - "Enabled":false, - "Interval":10 + "Discovery": { + "MDNS": { + "Enabled": false, + "Interval": 10 }, "webRTCStar": { "Enabled": false } }, - "Ipns":{ - "RepublishPeriod":"", - "RecordLifetime":"", - "ResolveCacheSize":128 + "Ipns": { + "RepublishPeriod": "", + "RecordLifetime": "", + "ResolveCacheSize": 128 }, - "Bootstrap":[ + "Bootstrap": [ "/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z", "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", "/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM", @@ -67,16 +67,16 @@ "/dns4/wss0.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmZMxNdpMkewiVZLMRxaNxUeZpDUb34pWjZ1kZvsd16Zic", "/dns4/wss1.bootstrap.libp2p.io/tcp/443/wss/ipfs/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6" ], - "Tour":{ - "Last":"" + "Tour": { + "Last": "" }, - "Gateway":{ - "HTTPHeaders":null, - "RootRedirect":"", - "Writable":false + "Gateway": { + "HTTPHeaders": null, + "RootRedirect": "", + "Writable": false }, - "SupernodeRouting":{ - "Servers":[ + "SupernodeRouting": { + "Servers": [ "/ip4/104.236.176.52/tcp/4002/ipfs/QmXdb7tWTxdFEQEFgWBqkuYSrZd3mXrC7HxkD4krGNYx2U", "/ip4/104.236.179.241/tcp/4002/ipfs/QmVRqViDByUxjUMoPnjurjKvZhaEMFDtK35FJXHAM4Lkj6", "/ip4/104.236.151.122/tcp/4002/ipfs/QmSZwGx8Tn8tmcM4PtDJaMeUQNRhNFdBLVGPzRiNaRJtFH", @@ -87,15 +87,23 @@ "/ip4/178.62.61.185/tcp/4002/ipfs/QmVw6fGNqBixZE4bewRLT2VXX7fAHUHs8JyidDiJ1P7RUN" ] }, - "API":{ - "HTTPHeaders":null + "API": { + "HTTPHeaders": null }, - "Swarm":{ - "AddrFilters":null + "Swarm": { + "AddrFilters": null }, - "Log":{ - "MaxSizeMB":250, - "MaxBackups":1, - "MaxAgeDays":0 + "Log": { + "MaxSizeMB": 250, + "MaxBackups": 1, + "MaxAgeDays": 0 + }, + "Keychain": { + "dek": { + "keyLength": 64, + "iterationCount": 10000, + "salt": "co5EbMmrhFwmhHjedZU73zhL", + "hash": "sha2-512" + } } -} +} \ No newline at end of file diff --git a/test/fixtures/go-ipfs-repo/datastore/CURRENT b/test/fixtures/go-ipfs-repo/datastore/CURRENT index 23b73d9100..42c62b673a 100644 --- a/test/fixtures/go-ipfs-repo/datastore/CURRENT +++ b/test/fixtures/go-ipfs-repo/datastore/CURRENT @@ -1 +1 @@ -MANIFEST-000014 +MANIFEST-000015 diff --git a/test/fixtures/go-ipfs-repo/datastore/LOG b/test/fixtures/go-ipfs-repo/datastore/LOG index 96e7909dfc..15709837f7 100644 --- a/test/fixtures/go-ipfs-repo/datastore/LOG +++ b/test/fixtures/go-ipfs-repo/datastore/LOG @@ -1,29 +1 @@ -=============== Aug 25, 2016 (CEST) =============== -17:21:42.391799 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -17:21:42.393115 db@open opening -17:21:42.399749 db@janitor F·5 G·1 -17:21:42.399774 db@janitor removing manifest-4 -17:21:42.399904 db@open done T·6.754896ms -=============== Aug 25, 2016 (CEST) =============== -17:36:56.009638 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -17:36:56.009849 version@stat F·[2] S·1KiB[1KiB] Sc·[0.50] -17:36:56.009874 db@open opening -17:36:56.009943 journal@recovery F·1 -17:36:56.010918 journal@recovery recovering @8 -17:36:56.012317 memdb@flush created L0@10 N·4 S·1KiB "/ip..\xf6\xe4\xa9,d12":"/pk..TOA,v9" -17:36:56.013451 version@stat F·[3] S·2KiB[2KiB] Sc·[0.75] -17:36:56.014779 db@janitor F·5 G·0 -17:36:56.014815 db@open done T·4.928147ms -17:36:56.030081 db@close closing -17:36:56.030223 db@close done T·138.943µs -=============== Aug 25, 2016 (CEST) =============== -17:37:32.735975 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -17:37:32.736209 version@stat F·[3] S·2KiB[2KiB] Sc·[0.75] -17:37:32.736230 db@open opening -17:37:32.736304 journal@recovery F·1 -17:37:32.737385 journal@recovery recovering @11 -17:37:32.738575 version@stat F·[3] S·2KiB[2KiB] Sc·[0.75] -17:37:32.739466 db@janitor F·5 G·0 -17:37:32.739492 db@open done T·3.248709ms -17:37:51.684973 db@close closing -17:37:51.685242 db@close done T·168.908µs +2018/02/26-08:13:54.065997 70000aad6000 Delete type=3 #14 diff --git a/test/fixtures/go-ipfs-repo/datastore/LOG.old b/test/fixtures/go-ipfs-repo/datastore/LOG.old index 863b68fd57..96e7909dfc 100644 --- a/test/fixtures/go-ipfs-repo/datastore/LOG.old +++ b/test/fixtures/go-ipfs-repo/datastore/LOG.old @@ -1,10 +1,29 @@ -=============== Dec 10, 2015 (PST) =============== -07:50:02.056578 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed -07:50:02.057231 db@open opening -07:50:02.057312 journal@recovery F·1 -07:50:02.057514 journal@recovery recovering @3 -07:50:02.058921 mem@flush created L0@5 N·4 S·1KiB "/ip..\xf6\xe4\xa9,v5":"/pk..\xf6\xe4\xa9,v6" -07:50:02.059983 db@janitor F·4 G·0 -07:50:02.060001 db@open done T·2.755926ms -07:50:02.073183 db@close closing -07:50:02.073285 db@close done T·97.522µs +=============== Aug 25, 2016 (CEST) =============== +17:21:42.391799 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +17:21:42.393115 db@open opening +17:21:42.399749 db@janitor F·5 G·1 +17:21:42.399774 db@janitor removing manifest-4 +17:21:42.399904 db@open done T·6.754896ms +=============== Aug 25, 2016 (CEST) =============== +17:36:56.009638 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +17:36:56.009849 version@stat F·[2] S·1KiB[1KiB] Sc·[0.50] +17:36:56.009874 db@open opening +17:36:56.009943 journal@recovery F·1 +17:36:56.010918 journal@recovery recovering @8 +17:36:56.012317 memdb@flush created L0@10 N·4 S·1KiB "/ip..\xf6\xe4\xa9,d12":"/pk..TOA,v9" +17:36:56.013451 version@stat F·[3] S·2KiB[2KiB] Sc·[0.75] +17:36:56.014779 db@janitor F·5 G·0 +17:36:56.014815 db@open done T·4.928147ms +17:36:56.030081 db@close closing +17:36:56.030223 db@close done T·138.943µs +=============== Aug 25, 2016 (CEST) =============== +17:37:32.735975 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed +17:37:32.736209 version@stat F·[3] S·2KiB[2KiB] Sc·[0.75] +17:37:32.736230 db@open opening +17:37:32.736304 journal@recovery F·1 +17:37:32.737385 journal@recovery recovering @11 +17:37:32.738575 version@stat F·[3] S·2KiB[2KiB] Sc·[0.75] +17:37:32.739466 db@janitor F·5 G·0 +17:37:32.739492 db@open done T·3.248709ms +17:37:51.684973 db@close closing +17:37:51.685242 db@close done T·168.908µs diff --git a/test/fixtures/go-ipfs-repo/datastore/MANIFEST-000014 b/test/fixtures/go-ipfs-repo/datastore/MANIFEST-000015 similarity index 79% rename from test/fixtures/go-ipfs-repo/datastore/MANIFEST-000014 rename to test/fixtures/go-ipfs-repo/datastore/MANIFEST-000015 index bda0ce84e5..8c8a1fd7b1 100644 Binary files a/test/fixtures/go-ipfs-repo/datastore/MANIFEST-000014 and b/test/fixtures/go-ipfs-repo/datastore/MANIFEST-000015 differ diff --git a/test/http-api/extra/block.js b/test/http-api/block.js similarity index 98% rename from test/http-api/extra/block.js rename to test/http-api/block.js index 642d626a68..d0133bbc67 100644 --- a/test/http-api/extra/block.js +++ b/test/http-api/block.js @@ -12,9 +12,10 @@ const waterfall = require('async/waterfall') const DaemonFactory = require('ipfsd-ctl') const df = DaemonFactory.create({ exec: 'src/cli/bin.js' }) -describe('extra block', () => { +describe('block endpoint', () => { let ipfs = null let ipfsd = null + before(function (done) { this.timeout(20 * 1000) diff --git a/test/http-api/extra/bootstrap.js b/test/http-api/bootstrap.js similarity index 99% rename from test/http-api/extra/bootstrap.js rename to test/http-api/bootstrap.js index b14075393c..98a3610609 100644 --- a/test/http-api/extra/bootstrap.js +++ b/test/http-api/bootstrap.js @@ -10,7 +10,7 @@ chai.use(dirtyChai) const DaemonFactory = require('ipfsd-ctl') const df = DaemonFactory.create({ exec: 'src/cli/bin.js' }) -describe('extra bootstrap', () => { +describe('bootstrap endpoint', () => { let ipfs = null let ipfsd = null before(function (done) { diff --git a/test/http-api/extra/config.js b/test/http-api/config.js similarity index 94% rename from test/http-api/extra/config.js rename to test/http-api/config.js index 0d9ae6e907..6bae487caa 100644 --- a/test/http-api/extra/config.js +++ b/test/http-api/config.js @@ -16,9 +16,9 @@ const path = require('path') const DaemonFactory = require('ipfsd-ctl') const df = DaemonFactory.create({ exec: 'src/cli/bin.js' }) -describe('extra config', () => { - const repoExample = path.join(__dirname, '../../fixtures/go-ipfs-repo') - const repoTests = path.join(__dirname, '../../repo-tests-run') +describe('config endpoint', () => { + const repoExample = path.join(__dirname, '../fixtures/go-ipfs-repo') + const repoTests = path.join(__dirname, '../repo-tests-run') let updatedConfig = null @@ -46,7 +46,7 @@ describe('extra config', () => { ipfs = ipfsd.api updatedConfig = () => { - const file = fs.readFileSync(path.join(__dirname, '../../repo-tests-run/config')) + const file = fs.readFileSync(path.join(__dirname, '../repo-tests-run/config')) return JSON.parse(file, 'utf8') } diff --git a/test/http-api/extra/dns.js b/test/http-api/dns.js similarity index 95% rename from test/http-api/extra/dns.js rename to test/http-api/dns.js index 365dca73a2..3d8b1e669d 100644 --- a/test/http-api/extra/dns.js +++ b/test/http-api/dns.js @@ -9,7 +9,7 @@ chai.use(dirtyChai) const DaemonFactory = require('ipfsd-ctl') const df = DaemonFactory.create({ exec: 'src/cli/bin.js' }) -describe('extra dns', () => { +describe('dns endpoint', () => { let ipfs = null let ipfsd = null before(function (done) { diff --git a/test/http-api/extra/index.js b/test/http-api/extra/index.js deleted file mode 100644 index fff181e750..0000000000 --- a/test/http-api/extra/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-env mocha */ -'use strict' - -const fs = require('fs') -const path = require('path') - -describe('## extra tests with ipfs-api', () => { - fs.readdirSync(path.join(__dirname)) - .forEach((file) => { - // TODO(victor) want to make all this loading of tests proper, but for now - if (file.includes('utils') || file.includes('index.js')) { - return - } - require(`./${file}`) - }) -}) diff --git a/test/http-api/extra/id.js b/test/http-api/id.js similarity index 89% rename from test/http-api/extra/id.js rename to test/http-api/id.js index 3ee69bc4a1..4300be7fce 100644 --- a/test/http-api/extra/id.js +++ b/test/http-api/id.js @@ -14,9 +14,9 @@ const path = require('path') const DaemonFactory = require('ipfsd-ctl') const df = DaemonFactory.create({ exec: 'src/cli/bin.js' }) -describe('extra id', () => { - const repoExample = path.join(__dirname, '../../fixtures/go-ipfs-repo') - const repoTests = path.join(__dirname, '../../repo-tests-run') +describe('id endpoint', () => { + const repoExample = path.join(__dirname, '../fixtures/go-ipfs-repo') + const repoTests = path.join(__dirname, '../repo-tests-run') let ipfs = null let ipfsd = null @@ -28,7 +28,7 @@ describe('extra id', () => { waterfall([ (cb) => df.spawn({ - repoPath: path.join(__dirname, '../../fixtures/go-ipfs-repo'), + repoPath: path.join(__dirname, '../fixtures/go-ipfs-repo'), initOptions: { bits: 512 }, disposable: false, start: true diff --git a/test/http-api/index.js b/test/http-api/index.js index 0d6941e9dd..44d48f7f1f 100644 --- a/test/http-api/index.js +++ b/test/http-api/index.js @@ -1,5 +1,11 @@ 'use strict' -require('./spec') require('./interface') -require('./extra') +require('./inject') +require('./block') +require('./bootstrap') +require('./config') +require('./dns') +require('./id') +require('./object') +require('./version') diff --git a/test/http-api/spec/bitswap.js b/test/http-api/inject/bitswap.js similarity index 100% rename from test/http-api/spec/bitswap.js rename to test/http-api/inject/bitswap.js diff --git a/test/http-api/spec/block.js b/test/http-api/inject/block.js similarity index 100% rename from test/http-api/spec/block.js rename to test/http-api/inject/block.js diff --git a/test/http-api/spec/bootstrap.js b/test/http-api/inject/bootstrap.js similarity index 100% rename from test/http-api/spec/bootstrap.js rename to test/http-api/inject/bootstrap.js diff --git a/test/http-api/spec/config.js b/test/http-api/inject/config.js similarity index 100% rename from test/http-api/spec/config.js rename to test/http-api/inject/config.js diff --git a/test/http-api/spec/dns.js b/test/http-api/inject/dns.js similarity index 100% rename from test/http-api/spec/dns.js rename to test/http-api/inject/dns.js diff --git a/test/http-api/spec/files.js b/test/http-api/inject/files.js similarity index 100% rename from test/http-api/spec/files.js rename to test/http-api/inject/files.js diff --git a/test/http-api/spec/id.js b/test/http-api/inject/id.js similarity index 100% rename from test/http-api/spec/id.js rename to test/http-api/inject/id.js diff --git a/test/http-api/spec/index.js b/test/http-api/inject/index.js similarity index 100% rename from test/http-api/spec/index.js rename to test/http-api/inject/index.js diff --git a/test/http-api/spec/object.js b/test/http-api/inject/object.js similarity index 100% rename from test/http-api/spec/object.js rename to test/http-api/inject/object.js diff --git a/test/http-api/spec/pubsub.js b/test/http-api/inject/pubsub.js similarity index 100% rename from test/http-api/spec/pubsub.js rename to test/http-api/inject/pubsub.js diff --git a/test/http-api/spec/version.js b/test/http-api/inject/version.js similarity index 100% rename from test/http-api/spec/version.js rename to test/http-api/inject/version.js diff --git a/test/http-api/extra/object.js b/test/http-api/object.js similarity index 99% rename from test/http-api/extra/object.js rename to test/http-api/object.js index eced7f28f6..dfde75d3d4 100644 --- a/test/http-api/extra/object.js +++ b/test/http-api/object.js @@ -22,7 +22,7 @@ function asJson (cb) { } } -describe('extra object', () => { +describe('object endpoint', () => { let ipfs = null let ipfsd = null before(function (done) { diff --git a/test/http-api/extra/utils/get-ctl.js b/test/http-api/utils/get-ctl.js similarity index 98% rename from test/http-api/extra/utils/get-ctl.js rename to test/http-api/utils/get-ctl.js index 5867370928..8ece0fc51c 100644 --- a/test/http-api/extra/utils/get-ctl.js +++ b/test/http-api/utils/get-ctl.js @@ -1,5 +1,7 @@ 'use strict' + const APIctl = require('ipfs-api') + module.exports = (http) => { return APIctl(http.api.apiMultiaddr) } diff --git a/test/http-api/extra/version.js b/test/http-api/version.js similarity index 96% rename from test/http-api/extra/version.js rename to test/http-api/version.js index 8a22deff0d..2f0d1b2925 100644 --- a/test/http-api/extra/version.js +++ b/test/http-api/version.js @@ -9,7 +9,7 @@ chai.use(dirtyChai) const DaemonFactory = require('ipfsd-ctl') const df = DaemonFactory.create({ exec: 'src/cli/bin.js' }) -describe('extra version', () => { +describe('version endpoint', () => { let ipfs = null let ipfsd = null before(function (done) {