Skip to content

Commit a680b1b

Browse files
committed
test: split 'ipfs config replace' test into parts
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
1 parent 2a2e3eb commit a680b1b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/sharness/t0021-config.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,17 @@ test_config_cmd() {
7272
grep "\"beep3\": false," actual
7373
'
7474

75-
test_expect_success "'ipfs config replace' works" '
75+
test_expect_success "setup for config replace test" '
7676
cp "$IPFS_PATH/config" newconfig.json &&
7777
sed -i -e /PrivKey/d -e s/10GB/11GB/ newconfig.json &&
78-
sed -i '"'"'/PeerID/ { s/,$// } '"'"' newconfig.json &&
79-
ipfs config replace - < newconfig.json &&
78+
sed -i '"'"'/PeerID/ { s/,$// } '"'"' newconfig.json
79+
'
80+
81+
test_expect_success "run 'ipfs config replace'" '
82+
ipfs config replace - < newconfig.json
83+
'
84+
85+
test_expect_success "check resulting config after 'ipfs config replace'" '
8086
sed -e /PrivKey/d "$IPFS_PATH/config" > replconfig.json &&
8187
sed -i -e'"'"'/PeerID/ { s/,$// } '"'"' replconfig.json &&
8288
test_cmp replconfig.json newconfig.json

0 commit comments

Comments
 (0)