Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
305cf122
提交
305cf122
authored
5月 16, 2016
作者:
Stephen Whitmore
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make t0030 use iptb for consistent test passing.
License: MIT Signed-off-by:
Stephen Whitmore
<
noffle@ipfs.io
>
上级
3b8ebe72
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
34 行增加
和
7 行删除
+34
-7
t0030-mount.sh
test/sharness/t0030-mount.sh
+34
-7
没有找到文件。
test/sharness/t0030-mount.sh
浏览文件 @
305cf122
...
...
@@ -15,13 +15,17 @@ if ! test_have_prereq FUSE; then
test_done
fi
test_init_ipfs
test_launch_ipfs_daemon
# start iptb + wait for peering
NUM_NODES
=
5
test_expect_success
'init iptb'
'
iptb init -n $NUM_NODES --bootstrap=none --port=0
'
startup_cluster
$NUM_NODES
# test mount failure before mounting properly.
# test mount failure before mounting properly.
test_expect_success
"'ipfs mount' fails when there is no mount dir"
'
tmp_ipfs_mount() { ipfs mount -f=not_ipfs -n=not_ipns >output 2>output.err; } &&
tmp_ipfs_mount() { ipfs
i 0
mount -f=not_ipfs -n=not_ipns >output 2>output.err; } &&
test_must_fail tmp_ipfs_mount
'
...
...
@@ -30,17 +34,40 @@ test_expect_success "'ipfs mount' output looks good" '
test_should_contain "not_ipns\|not_ipfs" output.err
'
# now mount properly, and keep going
test_mount_ipfs
test_expect_success
"setup and publish default IPNS value"
'
mkdir "$(pwd)/ipfs" "$(pwd)/ipns" &&
ipfsi 0 name publish QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
'
# make sure stuff is unmounted first
# then mount properly
test_expect_success FUSE
"'ipfs mount' succeeds"
'
do_umount "$(pwd)/ipfs" || true &&
do_umount "$(pwd)/ipns" || true &&
ipfsi 0 mount -f "$(pwd)/ipfs" -n "$(pwd)/ipns" >actual
'
test_expect_success FUSE
"'ipfs mount' output looks good"
'
echo "IPFS mounted at: $(pwd)/ipfs" >expected &&
echo "IPNS mounted at: $(pwd)/ipns" >>expected &&
test_cmp expected actual
'
test_expect_success
"mount directories cannot be removed while active"
'
test_must_fail rmdir ipfs ipns 2>/dev/null
'
test_kill_ipfs_daemon
test_expect_success
"unmount directories"
'
do_umount "$(pwd)/ipfs" &&
do_umount "$(pwd)/ipns"
'
test_expect_success
"mount directories can be removed after shutdown"
'
rmdir ipfs ipns
'
test_expect_success
'stop iptb'
'
iptb stop
'
test_done
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论