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

Commit 292e75f

Browse files
committed
refresh repo for each battery of tests
1 parent 52b89b0 commit 292e75f

File tree

39 files changed

+399
-15
lines changed

39 files changed

+399
-15
lines changed

src/ipfs-core/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ const os = require('os')
44

55
exports = module.exports
66

7-
exports.repoPath = process.env.IPFS_PATH || os.homedir() + '/.ipfs'
7+
exports.repoPath = function () {
8+
return process.env.IPFS_PATH || os.homedir() + '/.ipfs'
9+
}

src/ipfs-core/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function IPFS () {
1111
throw new Error('Must be instantiated with new')
1212
}
1313

14-
var repo = new IPFSRepo(config.repoPath)
14+
var repo = new IPFSRepo(config.repoPath())
1515

1616
this.daemon = callback => {
1717
// 1. read repo to get peer data
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
��Hello and Welcome to IPFS!
3+
4+
██╗██████╗ ███████╗███████╗
5+
██║██╔══██╗██╔════╝██╔════╝
6+
██║██████╔╝█████╗ ███████╗
7+
██║██╔═══╝ ██╔══╝ ╚════██║
8+
██║██║ ██║ ███████║
9+
╚═╝╚═╝ ╚═╝ ╚══════╝
10+
11+
If you're seeing this, you have successfully installed
12+
IPFS and are now interfacing with the ipfs merkledag!
13+
14+
-------------------------------------------------------
15+
| Warning: |
16+
| This is alpha software. Use at your own discretion! |
17+
| Much is missing or lacking polish. There are bugs. |
18+
| Not yet secure. Read the security notes for more. |
19+
-------------------------------------------------------
20+
21+
Check out some of the other files in this directory:
22+
23+
./about
24+
./help
25+
./quick-start <-- usage examples
26+
./readme <-- this file
27+
./security-notes
28+
�
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
5
2+
" ���׾F�_�uؔ�l��z�S?��|ڲ��Pc@ js-ipfs-repo�
3+
4+

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
ys# js-ipfs-repo
3+
Implementation of the IPFS repo spec (https://github.com/ipfs/specs/tree/master/repo) in JavaScript
4+
s
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
�� IPFS Alpha Security Notes
3+
4+
We try hard to ensure our system is safe and robust, but all software
5+
has bugs, especially new software. This distribution is meant to be an
6+
alpha preview, don't use it for anything mission critical.
7+
8+
Please note the following:
9+
10+
- This is alpha software and has not been audited. It is our goal
11+
to conduct a proper security audit once we close in on a 1.0 release.
12+
13+
- ipfs is a networked program, and may have serious undiscovered
14+
vulnerabilities. It is written in Go, and we do not execute any
15+
user provided data. But please point any problems out to us in a
16+
github issue, or email [email protected] privately.
17+
18+
- ipfs uses encryption for all communication, but it's NOT PROVEN SECURE
19+
YET! It may be totally broken. For now, the code is included to make
20+
sure we benchmark our operations with encryption in mind. In the future,
21+
there will be an "unsafe" mode for high performance intranet apps.
22+
If this is a blocking feature for you, please contact us.
23+
�
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+


tests/repo-tests1452379313131/blocks/122062ce/122062ce1f2c91a13a97b596e873b5a3346a644605d7614dca53cd3a59f7385a8abb.data

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
2+
��# 0.1 - Quick Start
3+
4+
This is a set of short examples with minimal explanation. It is meant as
5+
a "quick start". Soon, we'll write a longer tour :-)
6+
7+
8+
Add a file to ipfs:
9+
10+
echo "hello world" >hello
11+
ipfs add hello
12+
13+
14+
View it:
15+
16+
ipfs cat <the-hash-you-got-here>
17+
18+
19+
Try a directory:
20+
21+
mkdir foo
22+
mkdir foo/bar
23+
echo "baz" > foo/baz
24+
echo "baz" > foo/bar/baz
25+
ipfs add -r foo
26+
27+
28+
View things:
29+
30+
ipfs ls <the-hash-here>
31+
ipfs ls <the-hash-here>/bar
32+
ipfs cat <the-hash-here>/baz
33+
ipfs cat <the-hash-here>/bar/baz
34+
ipfs cat <the-hash-here>/bar
35+
ipfs ls <the-hash-here>/baz
36+
37+
38+
References:
39+
40+
ipfs refs <the-hash-here>
41+
ipfs refs -r <the-hash-here>
42+
ipfs refs --help
43+
44+
45+
Get:
46+
47+
ipfs get <the-hash-here> foo2
48+
diff foo foo2
49+
50+
51+
Objects:
52+
53+
ipfs object get <the-hash-here>
54+
ipfs object get <the-hash-here>/foo2
55+
ipfs object --help
56+
57+
58+
Pin + GC:
59+
60+
ipfs pin -r <the-hash-here>
61+
ipfs gc
62+
ipfs ls <the-hash-here>
63+
ipfs unpin -r <the-hash-here>
64+
ipfs gc
65+
66+
67+
Daemon:
68+
69+
ipfs daemon (in another terminal)
70+
ipfs id
71+
72+
73+
Network:
74+
75+
(must be online)
76+
ipfs swarm peers
77+
ipfs id
78+
ipfs cat <hash-of-remote-object>
79+
80+
81+
Mount:
82+
83+
(warning: fuse is finicky!)
84+
ipfs mount
85+
cd /ipfs/<
86+
87+
88+
Tool:
89+
90+
ipfs version
91+
ipfs update
92+
ipfs commands
93+
ipfs config --help
94+
open http://localhost:5001/webui
95+
96+
97+
Browse:
98+
99+
webui:
100+
101+
http://localhost:5001/webui
102+
103+
video:
104+
105+
http://localhost:8080/ipfs/QmVc6zuAneKJzicnJpfrqCH9gSy6bz54JhcypfJYhGUFQu/play#/ipfs/QmTKZgRNwDNZwHtJSjCp6r5FYefzpULfy37JvMt9DwvXse
106+
107+
images:
108+
109+
http://localhost:8080/ipfs/QmZpc3HvfjEXvLWGQPWbHk3AjD5j8NEN4gmFN8Jmrd5g83/cs
110+
111+
markdown renderer app:
112+
113+
http://localhost:8080/ipfs/QmX7M9CiYXjVeFnkfVGf3y5ixTZ2ACeSGyL1vBJY1HvQPp/mdown
114+
�
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
4
2+
" Y��9_)a���˹2�R�m�Ŗke�9�� js-ipfs-repo
3+

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0
2+
" ��,��Qv3��k>\�IzxEEl�M/f�LICENSE�1
3+
" JZ�XoR�X�!Fwd87U��;��SöWw� README.md{
4+

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
��The MIT License (MIT)
3+
4+
Copyright (c) 2015 IPFS
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
23+
24+
�
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
��Some helpful resources for finding your way around ipfs:
3+
4+
- quick-start: a quick show of various ipfs features.
5+
- ipfs commands: a list of all commands
6+
- ipfs --help: every command describes itself
7+
- https://github.com/ipfs/go-ipfs -- the src repository
8+
- #ipfs on irc.freenode.org -- the community irc channel
9+
�
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
��Come hang out in our IRC chat room if you have any questions.
3+
4+
Contact the ipfs dev team:
5+
- Bugs: https://github.com/ipfs/go-ipfs/issues
6+
- Help: irc.freenode.org/#ipfs
7+
8+
�

tests/repo-tests1452379313131/blocks/1220a52c/1220a52c3602030cb912edfe4de97002fdadf9d45666c3be122a2efb5db93c1d5fa6.data

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
��
3+
IPFS -- Inter-Planetary File system
4+
5+
IPFS is a global, versioned, peer-to-peer filesystem. It combines good ideas
6+
from Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single bit-
7+
torrent swarm, exchanging git objects. IPFS provides an interface as simple
8+
as the HTTP web, but with permanence built in. You can also mount the world
9+
at /ipfs.
10+
11+
IPFS is a protocol:
12+
- defines a content-addressed file system
13+
- coordinates content delivery
14+
- combines Kademlia + BitTorrent + Git
15+
16+
IPFS is a filesystem:
17+
- has directories and files
18+
- mountable filesystem (via FUSE)
19+
20+
IPFS is a web:
21+
- can be used to view documents like the web
22+
- files accessible via HTTP at `http://ipfs.io/<path>`
23+
- browsers or extensions can learn to use `ipfs://` directly
24+
- hash-addressed content guarantees authenticity
25+
26+
IPFS is modular:
27+
- connection layer over any network protocol
28+
- routing layer
29+
- uses a routing layer DHT (kademlia/coral)
30+
- uses a path-based naming service
31+
- uses bittorrent-inspired block exchange
32+
33+
IPFS uses crypto:
34+
- cryptographic-hash content addressing
35+
- block-level deduplication
36+
- file integrity + versioning
37+
- filesystem-level encryption + signing support
38+
39+
IPFS is p2p:
40+
- worldwide peer-to-peer file transfers
41+
- completely decentralized architecture
42+
- **no** central point of failure
43+
44+
IPFS is a cdn:
45+
- add a file to the filesystem locally, and it's now available to the world
46+
- caching-friendly (content-hash naming)
47+
- bittorrent-based bandwidth distribution
48+
49+
IPFS has a name service:
50+
- IPNS, an SFS inspired name system
51+
- global namespace based on PKI
52+
- serves to build trust chains
53+
- compatible with other NSes
54+
- can map DNS, .onion, .bit, etc to IPNS
55+
�

tests/repo-tests1452379313131/blocks/1220e3b0/1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.data

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/
2+
" g�q���6\u�8~:��6~�g���Z.��direct�T2
3+
" 6(���%݄���.��Ӿ5(���������ab recursive�T

tests/repo-tests1452379313131/blocks/1220ec5b/1220ec5b533a3218991f4377b8b8c2538b95dd29d31eac6433af0fb6fcd83dd80778.data

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/
2+
" �@������ԆD���g����A���7direct�T2
3+
" �;A��P���Y0��k��}�E�=��p���� recursive�T

tests/repo-tests1452379313131/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Identity":{"PeerID":"QmQ2zigjQikYnyYUSXZydNXrDRhBut2mubwJBaLXobMt3A","PrivKey":"CAASpgkwggSiAgEAAoIBAQC2SKo/HMFZeBml1AF3XijzrxrfQXdJzjePBZAbdxqKR1Mc6juRHXij6HXYPjlAk01BhF1S3Ll4Lwi0cAHhggf457sMg55UWyeGKeUv0ucgvCpBwlR5cQ020i0MgzjPWOLWq1rtvSbNcAi2ZEVn6+Q2EcHo3wUvWRtLeKz+DZSZfw2PEDC+DGPJPl7f8g7zl56YymmmzH9liZLNrzg/qidokUv5u1pdGrcpLuPNeTODk0cqKB+OUbuKj9GShYECCEjaybJDl9276oalL9ghBtSeEv20kugatTvYy590wFlJkkvyl+nPxIH0EEYMKK9XRWlu9XYnoSfboiwcv8M3SlsjAgMBAAECggEAZtju/bcKvKFPz0mkHiaJcpycy9STKphorpCT83srBVQi59CdFU6Mj+aL/xt0kCPMVigJw8P3/YCEJ9J+rS8BsoWE+xWUEsJvtXoT7vzPHaAtM3ci1HZd302Mz1+GgS8Epdx+7F5p80XAFLDUnELzOzKftvWGZmWfSeDnslwVONkL/1VAzwKy7Ce6hk4SxRE7l2NE2OklSHOzCGU1f78ZzVYKSnS5Ag9YrGjOAmTOXDbKNKN/qIorAQ1bovzGoCwx3iGIatQKFOxyVCyO1PsJYT7JO+kZbhBWRRE+L7l+ppPER9bdLFxs1t5CrKc078h+wuUr05S1P1JjXk68pk3+kQKBgQDeK8AR11373Mzib6uzpjGzgNRMzdYNuExWjxyxAzz53NAR7zrPHvXvfIqjDScLJ4NcRO2TddhXAfZoOPVH5k4PJHKLBPKuXZpWlookCAyENY7+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},"Addresses":{"Swarm":["/ip4/0.0.0.0/tcp/4001","/ip6/::/tcp/4001"],"API":"/ip4/127.0.0.1/tcp/5001","Gateway":"/ip4/127.0.0.1/tcp/8080"},"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"},"Discovery":{"MDNS":{"Enabled":true,"Interval":10}},"Ipns":{"RepublishPeriod":"","RecordLifetime":"","ResolveCacheSize":128},"Bootstrap":["/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ","/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z","/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM","/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm","/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu","/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64","/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd","/ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3","/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx"],"Tour":{"Last":""},"Gateway":{"HTTPHeaders":null,"RootRedirect":"","Writable":false},"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","/ip4/162.243.248.213/tcp/4002/ipfs/QmbHVEEepCi7rn7VL7Exxpd2Ci9NNB6ifvqwhsrbRMgQFP","/ip4/128.199.219.111/tcp/4002/ipfs/Qmb3brdCYmKG1ycwqCbo6LUwWxTuo3FisnJV2yir7oN92R","/ip4/104.236.76.40/tcp/4002/ipfs/QmdRBCV8Cz2dGhoKLkD3YjPwVFECmqADQkx5ZteF2c6Fy4","/ip4/178.62.158.247/tcp/4002/ipfs/QmUdiMPci7YoEUBkyFZAh2pAbjqcPr7LezyiPD2artLw3v","/ip4/178.62.61.185/tcp/4002/ipfs/QmVw6fGNqBixZE4bewRLT2VXX7fAHUHs8JyidDiJ1P7RUN"]},"API":{"HTTPHeaders":null},"Swarm":{"AddrFilters":null},"Log":{"MaxSizeMB":250,"MaxBackups":1,"MaxAgeDays":0}}
211 Bytes
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MANIFEST-000007

tests/repo-tests1452379313131/datastore/LOCK

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=============== Dec 10, 2015 (PST) ===============
2+
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
3+
07:50:02.057231 db@open opening
4+
07:50:02.057312 journal@recovery F·1
5+
07:50:02.057514 journal@recovery recovering @3
6+
07:50:02.058921 mem@flush created L0@5 N·4 S·1KiB "/ip..\xf6\xe4\xa9,v5":"/pk..\xf6\xe4\xa9,v6"
7+
07:50:02.059983 db@janitor F·4 G·0
8+
07:50:02.060001 db@open done T·2.755926ms
9+
07:50:02.073183 db@close closing
10+
07:50:02.073285 db@close done T·97.522µs
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=============== Dec 10, 2015 (PST) ===============
2+
07:49:57.048841 log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed
3+
07:49:57.049014 db@open opening
4+
07:49:57.049066 journal@recovery F·1
5+
07:49:57.049233 journal@recovery recovering @1
6+
07:49:57.049693 mem@flush created L0@2 N·2 S·211B "/lo..oot,v2":"/lo..ins,v1"
7+
07:49:57.050381 db@janitor F·3 G·0
8+
07:49:57.050397 db@open done T·1.375431ms
9+
07:49:57.064580 db@close closing
10+
07:49:57.064655 db@close done T·72.59µs
Binary file not shown.

tests/repo-tests1452379313131/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3

tests/test-api/index.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,32 @@
44

55
const fs = require('fs')
66
const expect = require('chai').expect
7-
process.env.IPFS_PATH = process.cwd() + '/tests/repo-example'
87
const api = require('../../src/http-api')
8+
const ncp = require('ncp').ncp
9+
const rimraf = require('rimraf')
910

1011
describe('api', () => {
12+
const repoExample = process.cwd() + '/tests/repo-example'
13+
const repoTests = process.cwd() + '/tests/repo-tests' + Date.now()
14+
process.env.IPFS_PATH = repoTests
15+
1116
before(done => {
12-
api.start(err => {
17+
ncp(repoExample, repoTests, err => {
1318
expect(err).to.not.exist
14-
done()
19+
api.start(err => {
20+
expect(err).to.not.exist
21+
done()
22+
})
1523
})
1624
})
1725

1826
after(done => {
1927
api.stop((err) => {
2028
expect(err).to.not.exist
21-
done()
29+
rimraf(repoTests, err => {
30+
expect(err).to.not.exist
31+
done()
32+
})
2233
})
2334
})
2435

0 commit comments

Comments
 (0)