Skip to content

Commit

Permalink
Merge pull request #718 from jbenet/improve_t0111
Browse files Browse the repository at this point in the history
test/sharness: improve t0111 using test_cmp
  • Loading branch information
jbenet committed Feb 2, 2015
2 parents 1d9d13e + ce10f20 commit 16c1390
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/sharness/t0111-gateway-writable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test_expect_success "HTTP POST file gives Hash" '
test_expect_success "We can HTTP GET file just created" '
FILEPATH=$(grep Location curl.out | cut -d" " -f3- | tr -d "\r")
curl -so outfile http://localhost:5002$FILEPATH &&
diff -u infile outfile
test_cmp infile outfile
'

test_expect_success "HTTP PUT empty directory" '
Expand Down Expand Up @@ -62,7 +62,7 @@ test_expect_success "We can HTTP GET file just created" '
[ "$FILEPATH" = "${FILEPATH%/test.txt}/test.txt" ] &&
echo "GET http://localhost:5002$FILEPATH" &&
curl -so outfile http://localhost:5002$FILEPATH &&
diff -u infile outfile
test_cmp infile outfile
'

test_expect_success "HTTP PUT file to append to existing hierarchy" '
Expand All @@ -81,10 +81,10 @@ test_expect_failure "We can HTTP GET file just created" '
[ "$FILEPATH" = "${FILEPATH%/test/test.txt}/test/test.txt" ] &&
echo "GET http://localhost:5002$FILEPATH" &&
curl -so outfile2 "http://localhost:5002$FILEPATH" &&
diff -u infile2 outfile2 &&
test_cmp infile2 outfile2 &&
echo "GET http://localhost:5002${FILEPATH%/test/test.txt}/test.txt" &&
curl -so outfile "http://localhost:5002${FILEPATH%/test/test.txt}/test.txt" &&
diff -u infile outfile
test_cmp infile outfile
'

test_kill_ipfs_daemon
Expand Down

0 comments on commit 16c1390

Please sign in to comment.