Skip to content

Commit

Permalink
feat: use grep and fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
rukolahasser committed Jan 10, 2022
1 parent 8448e89 commit 7e0ece9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/sharness/t0700-remotepin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ test_remote_pins ""

test_kill_ipfs_daemon

WARNINGMESSAGE="Warning: the local node is offline and remote pinning may fail if there is no other provider"

test_expect_success "'ipfs pin remote add' shows the warning message while offline" '
test_expect_code 0 ipfs pin remote add --service=test_pin_svc --enc=json $BASE_ARGS --name=name_a $HASH_A > actual &&
echo "Warning: the local node is offline and remote pinning may fail if there is no other provider" > expected &&
echo "{\"Status\":\"pinned\",\"Cid\":\"$HASH_A\",\"Name\":\"name_a\"}" >> expected &&
test_cmp expected actual
test_expect_code 0 grep -q "$WARNINGMESSAGE" actual
'

test_done
Expand Down

0 comments on commit 7e0ece9

Please sign in to comment.