mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-07 09:17:49 +08:00
test: split 'ipfs config replace' test into parts
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
parent
2a2e3eb185
commit
a680b1bd7b
@ -72,11 +72,17 @@ test_config_cmd() {
|
||||
grep "\"beep3\": false," actual
|
||||
'
|
||||
|
||||
test_expect_success "'ipfs config replace' works" '
|
||||
test_expect_success "setup for config replace test" '
|
||||
cp "$IPFS_PATH/config" newconfig.json &&
|
||||
sed -i -e /PrivKey/d -e s/10GB/11GB/ newconfig.json &&
|
||||
sed -i '"'"'/PeerID/ { s/,$// } '"'"' newconfig.json &&
|
||||
ipfs config replace - < newconfig.json &&
|
||||
sed -i '"'"'/PeerID/ { s/,$// } '"'"' newconfig.json
|
||||
'
|
||||
|
||||
test_expect_success "run 'ipfs config replace'" '
|
||||
ipfs config replace - < newconfig.json
|
||||
'
|
||||
|
||||
test_expect_success "check resulting config after 'ipfs config replace'" '
|
||||
sed -e /PrivKey/d "$IPFS_PATH/config" > replconfig.json &&
|
||||
sed -i -e'"'"'/PeerID/ { s/,$// } '"'"' replconfig.json &&
|
||||
test_cmp replconfig.json newconfig.json
|
||||
|
||||
Loading…
Reference in New Issue
Block a user