Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
72d01d3b
Unverified
提交
72d01d3b
authored
12月 23, 2019
作者:
Steven Allen
提交者:
GitHub
12月 23, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6805 from ipfs/sharness_macos_no_brainer_fixes
Sharness macos no brainer fixes
上级
3c95f65b
36dcf8ea
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
52 行增加
和
29 行删除
+52
-29
test-lib.sh
test/sharness/lib/test-lib.sh
+5
-1
t0010-basic-commands.sh
test/sharness/t0010-basic-commands.sh
+2
-1
t0060-daemon.sh
test/sharness/t0060-daemon.sh
+3
-7
t0061-daemon-opts.sh
test/sharness/t0061-daemon-opts.sh
+1
-1
t0080-repo.sh
test/sharness/t0080-repo.sh
+2
-2
t0095-refs.sh
test/sharness/t0095-refs.sh
+2
-0
t0121-bootstrap-iptb.sh
test/sharness/t0121-bootstrap-iptb.sh
+5
-5
t0130-multinode.sh
test/sharness/t0130-multinode.sh
+1
-1
t0180-p2p.sh
test/sharness/t0180-p2p.sh
+4
-4
t0181-private-network.sh
test/sharness/t0181-private-network.sh
+2
-0
t0184-http-proxy-over-p2p.sh
test/sharness/t0184-http-proxy-over-p2p.sh
+6
-0
t0235-cli-request.sh
test/sharness/t0235-cli-request.sh
+6
-0
t0236-cli-api-dns-resolve.sh
test/sharness/t0236-cli-api-dns-resolve.sh
+5
-0
t0280-plugin-git.sh
test/sharness/t0280-plugin-git.sh
+1
-1
t0300-docker-image.sh
test/sharness/t0300-docker-image.sh
+0
-4
t0301-docker-migrate.sh
test/sharness/t0301-docker-migrate.sh
+6
-1
t0600-issues-and-regressions-online.sh
test/sharness/t0600-issues-and-regressions-online.sh
+1
-1
没有找到文件。
test/sharness/lib/test-lib.sh
浏览文件 @
72d01d3b
...
...
@@ -52,9 +52,13 @@ TEST_OS="$(uname -s | tr '[a-z]' '[A-Z]')"
# grab + output options
test
"
$TEST_NO_FUSE
"
!=
1
&&
test_set_prereq FUSE
test
"
$TEST_EXPENSIVE
"
=
1
&&
test_set_prereq EXPENSIVE
test
"
$TEST_NO_DOCKER
"
!=
1
&&
type
docker
>
/dev/null 2>&1
&&
test_set_prereq DOCKER
test
"
$TEST_NO_DOCKER
"
!=
1
&&
type
docker
>
/dev/null 2>&1
&&
groups | egrep
"
\b
docker
\b
"
&&
test_set_prereq DOCKER
test
"
$TEST_NO_PLUGIN
"
!=
1
&&
test
"
$TEST_OS
"
=
"LINUX"
&&
test_set_prereq PLUGIN
# this may not be available, skip a few dependent tests
type
socat
>
/dev/null 2>&1
&&
test_set_prereq SOCAT
# Set a prereq as error messages are often different on Windows/Cygwin
expr
"
$TEST_OS
"
:
"CYGWIN_NT"
>
/dev/null
||
test_set_prereq STD_ERR_MSG
...
...
test/sharness/t0010-basic-commands.sh
浏览文件 @
72d01d3b
...
...
@@ -45,8 +45,9 @@ test_expect_success "ipfs version deps succeeds" '
ipfs version deps >deps.txt
'
test_expect_success
"ipfs version deps output looks good"
'
test_expect_success
"ipfs version deps output looks good
( set
\$
GOIPFSTEST_SKIP_LOCAL_DEVTREE_DEPS_CHECK to skip this test )
"
'
head -1 deps.txt | grep "go-ipfs@(devel)" &&
[[ "$GOIPFSTEST_SKIP_LOCAL_DEVTREE_DEPS_CHECK" == "1" ]] ||
[[ $(tail -n +2 deps.txt | egrep -v -c "^[^ @]+@v[^ @]+( => [^ @]+@v[^ @]+)?$") -eq 0 ]] ||
test_fsh cat deps.txt
'
...
...
test/sharness/t0060-daemon.sh
浏览文件 @
72d01d3b
...
...
@@ -108,8 +108,9 @@ test_expect_success "ipfs version deps succeeds" '
ipfs version deps >deps.txt
'
test_expect_success
"ipfs version deps output looks good"
'
test_expect_success
"ipfs version deps output looks good
( set
\$
GOIPFSTEST_SKIP_LOCAL_DEVTREE_DEPS_CHECK to skip this test )
"
'
head -1 deps.txt | grep "go-ipfs@(devel)" &&
[[ "$GOIPFSTEST_SKIP_LOCAL_DEVTREE_DEPS_CHECK" == "1" ]] ||
[[ $(tail -n +2 deps.txt | egrep -v -c "^[^ @]+@v[^ @]+( => [^ @]+@v[^ @]+)?$") -eq 0 ]] ||
test_fsh cat deps.txt
'
...
...
@@ -124,13 +125,8 @@ test_expect_success "ipfs help output looks good" '
test_fsh cat help.txt
'
# netcat (nc) is needed for the following test
test_expect_success
"socat is available"
'
type socat >/dev/null
'
# check transport is encrypted
test_expect_success
"transport should be encrypted
"
'
test_expect_success
SOCAT
"transport should be encrypted ( needs socat )
"
'
socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-ls &&
grep -q "/secio" swarmnc &&
test_must_fail grep -q "/plaintext/1.0.0" swarmnc ||
...
...
test/sharness/t0061-daemon-opts.sh
浏览文件 @
72d01d3b
...
...
@@ -17,7 +17,7 @@ gwyaddr=$GWAY_ADDR
apiaddr
=
$API_ADDR
# Odd. this fails here, but the inverse works on t0060-daemon.
test_expect_success
'transport should be unencrypted
'
'
test_expect_success
SOCAT
'transport should be unencrypted ( needs socat )
'
'
socat - tcp:localhost:$SWARM_PORT,connect-timeout=1 > swarmnc < ../t0060-data/mss-ls &&
grep -q -v "/secio" swarmnc &&
grep -q "/plaintext" swarmnc ||
...
...
test/sharness/t0080-repo.sh
浏览文件 @
72d01d3b
...
...
@@ -247,10 +247,10 @@ test_expect_success "'ipfs repo stat --human' succeeds" '
test_expect_success
"repo stats --human came out correct"
'
grep "RepoPath" repo-stats-human &&
grep -
P
"RepoSize:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human &&
grep -
E
"RepoSize:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human &&
grep "NumObjects" repo-stats-human &&
grep "Version" repo-stats-human &&
grep -
P
"StorageMax:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human ||
grep -
E
"StorageMax:\s*([0-9]*[.])?[0-9]+\s+?(B|kB|MB|GB|TB|PB|EB)" repo-stats-human ||
test_fsh cat repo-stats-human
'
...
...
test/sharness/t0095-refs.sh
浏览文件 @
72d01d3b
...
...
@@ -182,4 +182,6 @@ test_refs_output '' 'cat'
test_refs_output
'--cid-base=base32'
'ipfs cid base32'
test_kill_ipfs_daemon
test_done
test/sharness/t0121-bootstrap-iptb.sh
浏览文件 @
72d01d3b
...
...
@@ -38,11 +38,11 @@ betterwait() {
}
test_expect_success
"bring down iptb nodes"
'
PID0=$(cat "$IPTB_ROOT/
benche
s/default/0/daemon.pid") &&
PID1=$(cat "$IPTB_ROOT/
benche
s/default/1/daemon.pid") &&
PID2=$(cat "$IPTB_ROOT/
benche
s/default/2/daemon.pid") &&
PID3=$(cat "$IPTB_ROOT/
benche
s/default/3/daemon.pid") &&
PID4=$(cat "$IPTB_ROOT/
benche
s/default/4/daemon.pid") &&
PID0=$(cat "$IPTB_ROOT/
testbed
s/default/0/daemon.pid") &&
PID1=$(cat "$IPTB_ROOT/
testbed
s/default/1/daemon.pid") &&
PID2=$(cat "$IPTB_ROOT/
testbed
s/default/2/daemon.pid") &&
PID3=$(cat "$IPTB_ROOT/
testbed
s/default/3/daemon.pid") &&
PID4=$(cat "$IPTB_ROOT/
testbed
s/default/4/daemon.pid") &&
iptb stop && # TODO: add --wait flag to iptb stop
betterwait $PID0
betterwait $PID1
...
...
test/sharness/t0130-multinode.sh
浏览文件 @
72d01d3b
...
...
@@ -80,7 +80,7 @@ run_advanced_test() {
test_expect_success
"shut down nodes"
'
iptb stop && iptb_wait_stop ||
test_fsh tail -n +1 .iptb/
benche
s/default/*/daemon.std*
test_fsh tail -n +1 .iptb/
testbed
s/default/*/daemon.std*
'
}
...
...
test/sharness/t0180-p2p.sh
浏览文件 @
72d01d3b
...
...
@@ -22,10 +22,10 @@ test_expect_success 'peer ids' '
'
check_test_ports
()
{
test_expect_success
"test ports are closed"
'
(! (netstat -
lnp | grep "LISTEN" | grep ":
10101 ")) &&
(! (netstat -
lnp | grep "LISTEN" | grep ":10102 "))
&&
(! (netstat -
lnp | grep "LISTEN" | grep ":
10103 ")) &&
(! (netstat -
lnp | grep "LISTEN" | grep ":
10104 "))
(! (netstat -
aln | grep "LISTEN" | grep -E "[.:]
10101 ")) &&
(! (netstat -
aln | grep "LISTEN" | grep -E "[.:]10102 "))
&&
(! (netstat -
aln | grep "LISTEN" | grep -E "[.:]
10103 ")) &&
(! (netstat -
aln | grep "LISTEN" | grep -E "[.:]
10104 "))
'
}
check_test_ports
...
...
test/sharness/t0181-private-network.sh
浏览文件 @
72d01d3b
...
...
@@ -132,4 +132,6 @@ test_expect_success "stop testbed" '
iptb stop
'
test_kill_ipfs_daemon
test_done
test/sharness/t0184-http-proxy-over-p2p.sh
浏览文件 @
72d01d3b
...
...
@@ -3,6 +3,12 @@
test_description
=
"Test http proxy over p2p"
.
lib/test-lib.sh
if
!
test_have_prereq SOCAT
;
then
skip_all
=
"skipping '
$test_description
': socat is not available"
test_done
fi
WEB_SERVE_PORT
=
5099
IPFS_GATEWAY_PORT
=
5199
SENDER_GATEWAY
=
"http://127.0.0.1:
$IPFS_GATEWAY_PORT
"
...
...
test/sharness/t0235-cli-request.sh
浏览文件 @
72d01d3b
...
...
@@ -8,6 +8,12 @@ test_description="test http requests made by cli"
.
lib/test-lib.sh
if
!
test_have_prereq SOCAT
;
then
skip_all
=
"skipping '
$test_description
': socat is not available"
test_done
fi
test_init_ipfs
test_expect_success
"start nc"
'
...
...
test/sharness/t0236-cli-api-dns-resolve.sh
浏览文件 @
72d01d3b
...
...
@@ -8,6 +8,11 @@ test_description="test dns resolution of api endpoint by cli"
.
lib/test-lib.sh
if
!
test_have_prereq SOCAT
;
then
skip_all
=
"skipping '
$test_description
': socat is not available"
test_done
fi
test_init_ipfs
test_expect_success
"start nc"
'
...
...
test/sharness/t0280-plugin-git.sh
浏览文件 @
72d01d3b
...
...
@@ -21,7 +21,7 @@ test_dag_git() {
'
test_expect_success
"successfully get added objects"
'
cat hashes | xargs -
i
ipfs dag get -- {} > /dev/null
cat hashes | xargs -
I {}
ipfs dag get -- {} > /dev/null
'
test_expect_success
"path traversals work"
'
...
...
test/sharness/t0300-docker-image.sh
浏览文件 @
72d01d3b
...
...
@@ -23,10 +23,6 @@ test_expect_success "'docker --version' output looks good" '
egrep "^Docker version" actual
'
test_expect_success
"current user is in the 'docker' group"
'
groups | egrep "\bdocker\b"
'
TEST_TRASH_DIR
=
$(
pwd
)
TEST_SCRIPTS_DIR
=
$(
dirname
"
$TEST_TRASH_DIR
"
)
TEST_TESTS_DIR
=
$(
dirname
"
$TEST_SCRIPTS_DIR
"
)
...
...
test/sharness/t0301-docker-migrate.sh
浏览文件 @
72d01d3b
...
...
@@ -10,11 +10,16 @@ test_description="Test docker image migration"
# if in travis CI on OSX, docker is not available
if
!
test_have_prereq DOCKER
;
then
skip_all
=
'skipping
docker tests
, docker not available'
skip_all
=
'skipping
'
$test_description
'
, docker not available'
test_done
fi
if
!
test_have_prereq SOCAT
;
then
skip_all
=
"skipping '
$test_description
': socat is not available"
test_done
fi
TEST_TRASH_DIR
=
$(
pwd
)
TEST_SCRIPTS_DIR
=
$(
dirname
"
$TEST_TRASH_DIR
"
)
TEST_TESTS_DIR
=
$(
dirname
"
$TEST_SCRIPTS_DIR
"
)
...
...
test/sharness/t0600-issues-and-regressions-online.sh
浏览文件 @
72d01d3b
...
...
@@ -46,7 +46,7 @@ test_expect_success "pin add api looks right - #3753" '
test_cmp pinrm_out pinrm_exp
'
test_expect_success
"no daemon crash on improper file argument - #4003
"
'
test_expect_success
SOCAT
"no daemon crash on improper file argument - #4003 ( test needs socat )
"
'
FNC=$(echo $API_ADDR | awk -F: '
\'
'{ printf "%s:%s", $1, $2 }'
\'
') &&
printf "POST /api/v0/add?pin=true HTTP/1.1\r\nHost: $API_ADDR\r\nContent-Type: multipart/form-data; boundary=Pyw9xQLtiLPE6XcI\r\nContent-Length: 22\r\n\r\n\r\n--Pyw9xQLtiLPE6XcI\r\n" | socat STDIO tcp-connect:$FNC | grep -m1 "500 Internal Server Error"
'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论