Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
28cf220d
Commit
28cf220d
authored
Jan 07, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dockertest -> test/3nodetest
parent
b479602b
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
35 additions
and
21 deletions
+35
-21
dockertest/bin/save_logs.sh
dockertest/bin/save_logs.sh
+0
-8
test/3nodetest/Makefile
test/3nodetest/Makefile
+5
-4
test/3nodetest/README.md
test/3nodetest/README.md
+0
-0
test/3nodetest/bin/.gitignore
test/3nodetest/bin/.gitignore
+0
-0
test/3nodetest/bin/clean.sh
test/3nodetest/bin/clean.sh
+0
-0
test/3nodetest/bin/save_logs.sh
test/3nodetest/bin/save_logs.sh
+8
-0
test/3nodetest/bootstrap/Dockerfile
test/3nodetest/bootstrap/Dockerfile
+0
-0
test/3nodetest/bootstrap/README.md
test/3nodetest/bootstrap/README.md
+0
-0
test/3nodetest/bootstrap/config
test/3nodetest/bootstrap/config
+0
-0
test/3nodetest/build/.gitignore
test/3nodetest/build/.gitignore
+0
-0
test/3nodetest/build/.gitkeep
test/3nodetest/build/.gitkeep
+0
-0
test/3nodetest/client/Dockerfile
test/3nodetest/client/Dockerfile
+0
-0
test/3nodetest/client/config
test/3nodetest/client/config
+0
-0
test/3nodetest/client/run.sh
test/3nodetest/client/run.sh
+6
-6
test/3nodetest/data/.gitignore
test/3nodetest/data/.gitignore
+0
-0
test/3nodetest/data/Dockerfile
test/3nodetest/data/Dockerfile
+0
-0
test/3nodetest/fig.yml
test/3nodetest/fig.yml
+0
-0
test/3nodetest/run-test-on-img.sh
test/3nodetest/run-test-on-img.sh
+0
-0
test/3nodetest/server/Dockerfile
test/3nodetest/server/Dockerfile
+0
-0
test/3nodetest/server/README.md
test/3nodetest/server/README.md
+0
-0
test/3nodetest/server/config
test/3nodetest/server/config
+0
-0
test/3nodetest/server/run.sh
test/3nodetest/server/run.sh
+3
-3
test/jenkins/network-test.sh
test/jenkins/network-test.sh
+13
-0
No files found.
dockertest/bin/save_logs.sh
deleted
100644 → 0
View file @
b479602b
# STRIP strips color from terminal output
STRIP
=
"perl -pe 's/
\e\[
?.*?[
\@
-~]//g'"
# TODO use a for loop like a grownup
docker logs dockertest_bootstrap_1 2>&1 |
eval
$STRIP
>
./build/bootstrap.log
docker logs dockertest_client_1 2>&1 |
eval
$STRIP
>
./build/client.log
docker logs dockertest_data_1 2>&1 |
eval
$STRIP
>
./build/data.log
docker logs dockertest_server_1 2>&1 |
eval
$STRIP
>
./build/server.log
docker
test/Makefile
→
test/3node
test/Makefile
View file @
28cf220d
RANDOMSRC
=
Godeps/_workspace/src/github.com/jbenet/go-random
/random
RANDOMSRC
=
../../
Godeps/_workspace/src/github.com/jbenet/go-random
IMAGE_NAME
=
ipfs-test-latest
IPFS_ROOT
=
../..
test
:
clean setup
./run-test-on-img.sh
$(IMAGE_NAME)
...
...
@@ -15,13 +16,13 @@ data/filetiny: Makefile
data/filerand
:
bin/random
./bin/random 50000000
>
./data/filerand
bin/random
:
go build
-o
./bin/random
../
$(RANDOMSRC)
bin/random
:
$(RANDOMSRC)/**/*.go
go build
-o
./bin/random
$(RANDOMSRC)
/random
# just build it every time... this part isn't
# even the lengthy part, and it decreases pain.
docker_ipfs_image
:
cd
..
&&
docker build
-t
$(IMAGE_NAME)
.
cd
$(IPFS_ROOT)
&&
docker build
-t
$(IMAGE_NAME)
.
docker images |
grep
$(IMAGE_NAME)
clean
:
...
...
docker
test/README.md
→
test/3node
test/README.md
View file @
28cf220d
File moved
docker
test/bin/.gitignore
→
test/3node
test/bin/.gitignore
View file @
28cf220d
File moved
docker
test/bin/clean.sh
→
test/3node
test/bin/clean.sh
View file @
28cf220d
File moved
test/3nodetest/bin/save_logs.sh
0 → 100644
View file @
28cf220d
# STRIP strips color from terminal output
STRIP
=
"perl -pe 's/
\e\[
?.*?[
\@
-~]//g'"
# TODO use a for loop like a grownup
docker logs 3nodetest_bootstrap_1 2>&1 |
eval
$STRIP
>
./build/bootstrap.log
docker logs 3nodetest_client_1 2>&1 |
eval
$STRIP
>
./build/client.log
docker logs 3nodetest_data_1 2>&1 |
eval
$STRIP
>
./build/data.log
docker logs 3nodetest_server_1 2>&1 |
eval
$STRIP
>
./build/server.log
docker
test/bootstrap/Dockerfile
→
test/3node
test/bootstrap/Dockerfile
View file @
28cf220d
File moved
docker
test/bootstrap/README.md
→
test/3node
test/bootstrap/README.md
View file @
28cf220d
File moved
docker
test/bootstrap/config
→
test/3node
test/bootstrap/config
View file @
28cf220d
File moved
docker
test/build/.gitignore
→
test/3node
test/build/.gitignore
View file @
28cf220d
File moved
docker
test/build/.gitkeep
→
test/3node
test/build/.gitkeep
View file @
28cf220d
File moved
docker
test/client/Dockerfile
→
test/3node
test/client/Dockerfile
View file @
28cf220d
File moved
docker
test/client/config
→
test/3node
test/client/config
View file @
28cf220d
File moved
docker
test/client/run.sh
→
test/3node
test/client/run.sh
View file @
28cf220d
ipfs bootstrap add /ip4/
$BOOTSTRAP_PORT_4011_TCP_ADDR
/tcp/
$BOOTSTRAP_PORT_4011_TCP_PORT
/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE
echo
"
docker
test> starting client daemon"
echo
"
3node
test> starting client daemon"
ipfs daemon &
sleep
3
while
[
!
-f
/data/idtiny
]
do
echo
"
docker
test> waiting for server to add the file..."
echo
"
3node
test> waiting for server to add the file..."
sleep
1
done
echo
"
docker
test> client found file with hash:"
$(
cat
/data/idtiny
)
echo
"
3node
test> client found file with hash:"
$(
cat
/data/idtiny
)
ipfs
cat
$(
cat
/data/idtiny
)
>
filetiny
...
...
@@ -25,10 +25,10 @@ fi
while
[
!
-f
/data/idrand
]
do
echo
"
docker
test> waiting for server to add the file..."
echo
"
3node
test> waiting for server to add the file..."
sleep
1
done
echo
"
docker
test> client found file with hash:"
$(
cat
/data/idrand
)
echo
"
3node
test> client found file with hash:"
$(
cat
/data/idrand
)
cat
/data/idrand
...
...
@@ -46,4 +46,4 @@ if (($? > 0)); then
exit
1
fi
echo
"
docker
test> success"
echo
"
3node
test> success"
docker
test/data/.gitignore
→
test/3node
test/data/.gitignore
View file @
28cf220d
File moved
docker
test/data/Dockerfile
→
test/3node
test/data/Dockerfile
View file @
28cf220d
File moved
docker
test/fig.yml
→
test/3node
test/fig.yml
View file @
28cf220d
File moved
docker
test/run-test-on-img.sh
→
test/3node
test/run-test-on-img.sh
View file @
28cf220d
File moved
docker
test/server/Dockerfile
→
test/3node
test/server/Dockerfile
View file @
28cf220d
File moved
docker
test/server/README.md
→
test/3node
test/server/README.md
View file @
28cf220d
File moved
docker
test/server/config
→
test/3node
test/server/config
View file @
28cf220d
File moved
docker
test/server/run.sh
→
test/3node
test/server/run.sh
View file @
28cf220d
...
...
@@ -3,7 +3,7 @@ ipfs bootstrap add /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_T
# wait for daemon to start/bootstrap
# alternatively use ipfs swarm connect
echo
"
docker
test> starting server daemon"
echo
"
3node
test> starting server daemon"
ipfs daemon &
sleep
3
# TODO instead of bootrapping: ipfs swarm connect /ip4/$BOOTSTRAP_PORT_4011_TCP_ADDR/tcp/$BOOTSTRAP_PORT_4011_TCP_PORT/QmNXuBh8HFsWq68Fid8dMbGNQTh7eG6hV9rr1fQyfmfomE
...
...
@@ -11,11 +11,11 @@ sleep 3
# must mount this volume from data container
ipfs add
-q
/data/filetiny
>
tmptiny
mv
tmptiny /data/idtiny
echo
"
docker
test> added tiny file. hash is"
$(
cat
/data/idtiny
)
echo
"
3node
test> added tiny file. hash is"
$(
cat
/data/idtiny
)
ipfs add
-q
/data/filerand
>
tmprand
mv
tmprand /data/idrand
echo
"
docker
test> added rand file. hash is"
$(
cat
/data/idrand
)
echo
"
3node
test> added rand file. hash is"
$(
cat
/data/idrand
)
# allow ample time for the client to pull the data
sleep
10000000
test/jenkins/network-test.sh
0 → 100755
View file @
28cf220d
#!/bin/sh
export
GOPATH
=
$WORKSPACE
PWD
=
`
pwd
`
cd
../3nodetest
make clean
make
test
make save_logs
docker
cp
3nodetest_server_1:/root/.go-ipfs/logs/events.log
$(
PWD
)
/build/server-events.log
docker
cp
3nodetest_bootstrap_1:/root/.go-ipfs/logs/events.log
$(
PWD
)
/build/bootstrap-events.log
docker
cp
3nodetest_client_1:/root/.go-ipfs/logs/events.log
$(
PWD
)
/build/client-events.log
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment