update test and do not overwrite in sharness test
License: MIT Signed-off-by: Kejie Zhang <601172892@qq.com>
Kejie Zhang committed
Sep 7, 2018 at 00:28 UTC
9898ba9309f674827a7ecf3f9a04c7a45c45fb36
2 files changed
+9
-9
cmd/ipfs/daemon.go
+3
-3
@@ -287,9 +287,9 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
287
288
// Start assembling node config
289
ncfg := &core.BuildCfg{
290
- Repo: repo,
291
- Permanent: true, // It is temporary way to signify that node is permanent
292
- Online: !offline,
290
+ Repo: repo,
291
+ Permanent: true, // It is temporary way to signify that node is permanent
292
+ Online: !offline,
293
DisableEncryptedConnections: unencrypted,
294
ExtraOpts: map[string]bool{
295
"pubsub": pubsub,
test/sharness/t0040-add-and-cat.sh
+6
-6
@@ -186,22 +186,22 @@ test_add_cat_file() {
186
'
187
188
test_expect_success "ipfs add --name" '
189
- HASH="QmdFyxZXsFiP4csgfM5uPu99AvFiKH62CSPDw5TP92nr7w" &&
189
+ NAMEHASH="QmdFyxZXsFiP4csgfM5uPu99AvFiKH62CSPDw5TP92nr7w" &&
190
echo "IPFS" | ipfs add --name file.txt > actual &&
191
- echo "added $HASH file.txt" > expected &&
191
+ echo "added $NAMEHASH file.txt" > expected &&
192
test_cmp expected actual
193
'
194
195
test_expect_success "ipfs add --name -w" '
196
- HASH1="QmdFyxZXsFiP4csgfM5uPu99AvFiKH62CSPDw5TP92nr7w" &&
196
+ NAMEHASH="QmdFyxZXsFiP4csgfM5uPu99AvFiKH62CSPDw5TP92nr7w" &&
197
echo "IPFS" | ipfs add -w --name file.txt | head -n1> actual &&
198
- echo "added $HASH1 file.txt" > expected &&
198
+ echo "added $NAMEHASH file.txt" > expected &&
199
test_cmp expected actual
200
'
201
202
test_expect_success "ipfs cat with name" '
203
- HASH=$(echo "IPFS" | ipfs add -w --name file.txt -Q) &&
204
- ipfs cat /ipfs/$HASH/file.txt > expected &&
203
+ NAMEHASH=$(echo "IPFS" | ipfs add -w --name file.txt -Q) &&
204
+ ipfs cat /ipfs/$NAMEHASH/file.txt > expected &&
205
echo "IPFS" > actual &&
206
test_cmp expected actual
207
'