Skip to content

Commit

Permalink
test: attempt to fix sed on travis
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
  • Loading branch information
Kubuxu committed Sep 8, 2016
1 parent a680b1b commit 539af92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/sharness/t0021-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ test_config_cmd() {

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
sed /PrivKey/d -e s/10GB/11GB/ -i newconfig.json &&
sed '"'"'/PeerID/ { s/,$// } '"'"' -i 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 &&
sed /PrivKey/d "$IPFS_PATH/config" > replconfig.json &&
sed '"'"'/PeerID/ { s/,$// } '"'"' -i replconfig.json &&
test_cmp replconfig.json newconfig.json
'

Expand Down

0 comments on commit 539af92

Please sign in to comment.